Drives/Chests now charge power based on Cell Types.

This commit is contained in:
AlgorithmX2
2014-01-24 10:32:31 -06:00
parent 35d51e23fb
commit 1d539a33a8
3 changed files with 25 additions and 3 deletions
+8
View File
@@ -188,6 +188,8 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive
items = new LinkedList();
fluids = new LinkedList();
double power = 2.0;
for (int x = 0; x < inv.getSizeInventory(); x++)
{
ItemStack is = inv.getStackInSlot( x );
@@ -204,6 +206,8 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive
if ( cell != null )
{
power += handlersBySlot[x].cellIdleDrain( is, cell );
DriveWatcher<IAEItemStack> ih = new DriveWatcher( cell, is, handlersBySlot[x], this );
ih.myPriority = priority;
invBySlot[x] = ih;
@@ -215,6 +219,8 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive
if ( cell != null )
{
power += handlersBySlot[x].cellIdleDrain( is, cell );
DriveWatcher<IAEItemStack> ih = new DriveWatcher( cell, is, handlersBySlot[x], this );
ih.myPriority = priority;
invBySlot[x] = ih;
@@ -225,6 +231,8 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive
}
}
gridProxy.setIdlePowerUsage( power );
isCached = true;
}
}