Browse Source

Update to workOrder cleanup

combat-2
MagicBot 7 months ago
parent
commit
6878916874
  1. 1
      src/engine/gameManager/BuildingManager.java
  2. 3
      src/engine/gameManager/ForgeManager.java

1
src/engine/gameManager/BuildingManager.java

@ -336,6 +336,7 @@ public enum BuildingManager {
if (ForgeManager.vendorWorkOrderLookup.get(hirelingNPC) != null) if (ForgeManager.vendorWorkOrderLookup.get(hirelingNPC) != null)
for (WorkOrder workOrder : ForgeManager.vendorWorkOrderLookup.get(hirelingNPC)) { for (WorkOrder workOrder : ForgeManager.vendorWorkOrderLookup.get(hirelingNPC)) {
workOrder.runCompleted = true; workOrder.runCompleted = true;
workOrder.vendor = null;
DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder); DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder);
} }
} }

3
src/engine/gameManager/ForgeManager.java

@ -63,8 +63,9 @@ public enum ForgeManager implements Runnable {
workOrder = forge.take(); workOrder = forge.take();
// For workOrders loaded from disk // For workOrders loaded from disk
// or vendors who were re-deeded
if (workOrder.runCompleted) if (workOrder.vendor == null && workOrder.runCompleted)
continue; continue;
// This workOrder has completed production. // This workOrder has completed production.

Loading…
Cancel
Save