From a16bef418bb3856dba84d13cc34b59cc7bc07a80 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 14 Apr 2024 17:02:36 -0400 Subject: [PATCH] forged items are persisted --- src/engine/gameManager/ForgeManager.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 0fbb5ae3..b9de1aa7 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -72,18 +72,20 @@ public enum ForgeManager implements Runnable { } // Remove the fake negativeID item from all collections. + // set the items as 'completed' for (Item memoryItem : toRemove) { + + // Update vendor window + + ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completed_item, 8, true); + DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); + workOrder.cooking.remove(memoryItem); inMemoryItemLookup.remove(memoryItem.objectUUID); vendorItemLookup.get(workOrder.vendor).remove(memoryItem); } - // Update vendor window - - ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completed_item, 8, true); - DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false); - Logger.info("item forged:" + workOrder.workOrderID + " (" + workOrder.total_produced + "/" + workOrder.total_to_produce + ")"); if (workOrder.total_produced >= workOrder.total_to_produce) {