Fixed Crafting CPU Render.

Finished Crafting Confirm Screen
Added logic to prevent crafting in cpus with too little storage.
This commit is contained in:
AlgorithmX2
2014-07-10 23:46:51 -05:00
parent f3359f619a
commit 7242dfeb08
14 changed files with 283 additions and 35 deletions
@@ -386,8 +386,13 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
private void updateCPU()
{
IAEItemStack send = finalOutput;
if ( finalOutput != null && finalOutput.getStackSize() <= 0 )
send = null;
for (TileCraftingMonitorTile t : status)
t.setJob( finalOutput );
t.setJob( send );
}
public IGrid getGrid()
@@ -468,6 +473,10 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
myLastLink = null;
tasks.clear();
waitingFor.resetStatus();
finalOutput = null;
updateCPU();
storeItems(); // marks dirty
}
@@ -701,6 +710,9 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
if ( !(job instanceof CraftingJob) )
return null;
if ( isBusy() || getAvailableStorage() < job.getByteTotal() )
return null;
IStorageGrid sg = g.getCache( IStorageGrid.class );
IMEInventory<IAEItemStack> storage = sg.getItemInventory();
MECraftingInventory ci = new MECraftingInventory( storage, true, false, false );