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