Browse Source

completed workOrders handling update

combat-2
MagicBot 6 months ago
parent
commit
77673fde5f
  1. 9
      src/engine/gameManager/ForgeManager.java

9
src/engine/gameManager/ForgeManager.java

@ -62,6 +62,11 @@ public enum ForgeManager implements Runnable { @@ -62,6 +62,11 @@ public enum ForgeManager implements Runnable {
try {
workOrder = forge.take();
// For workOrders loaded from disk
if (workOrder.runCompleted)
continue;
// This workOrder has completed production.
if (workOrder.total_produced >= workOrder.total_to_produce) {
@ -81,10 +86,8 @@ public enum ForgeManager implements Runnable { @@ -81,10 +86,8 @@ public enum ForgeManager implements Runnable {
// Update workOrder on disk
DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder);
}
if (workOrder.runCompleted)
continue;
}
// PERSIST current cooking batch and move
// our new items to vendor inventory

Loading…
Cancel
Save