Fixed Priority Order, Added Read/Write and some refactoring.

This commit is contained in:
AlgorithmX2
2014-01-26 00:48:09 -06:00
parent 68a1719794
commit 6ecb969801
8 changed files with 21 additions and 13 deletions
+10 -5
View File
@@ -45,16 +45,18 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
@Override
public T extractItems(T request, Actionable type, BaseActionSource src)
{
if ( !getAccess().hasPermission( AccessRestriction.READ ) )
return null;
return internal.extractItems( request, type, src );
}
@Override
public IItemList<T> getAvailableItems(IItemList out)
{/*
* if ( monitor != null ) { for (T is : monitor.getStorageList()) out.add( is );
*
* return out; } else
*/
{
if ( !getAccess().hasPermission( AccessRestriction.READ ) )
return out;
return internal.getAvailableItems( out );
}
@@ -81,6 +83,9 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
@Override
public boolean canAccept(T input)
{
if ( !getAccess().hasPermission( AccessRestriction.WRITE ) )
return false;
if ( myWhitelist == IncludeExclude.BLACKLIST && myPartitionList.isListed( input ) )
return false;
if ( myPartitionList.isEmpty() || myWhitelist == IncludeExclude.BLACKLIST )