From ac0c11cb4656c1f3efeff761bcc61f8956b81260 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 26 Apr 2024 15:56:04 -0400 Subject: [PATCH] Comment cleanup --- src/engine/gameManager/ForgeManager.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 6c811d34..d60f58e1 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -29,13 +29,13 @@ import java.util.concurrent.atomic.AtomicInteger; public enum ForgeManager implements Runnable { // MB Dev notes: - // Class handles all forge rolling mechanics for the game. + // Class handles all forge rolling mechanics for Magicbane. // - // WorkOrders may be submitted from any thread: usually (ItemProductionMsgHandler). + // .submit(workOrder) may be called from any thread: (ItemProductionMsgHandler). // Concurrency is managed by the same lock used by the warehouse (city.cityTransactionLock). - // WorkOrders are persisted then reconstituted at bootstrap from table dyn.workorders. + // WorkOrders are persisted then reconstituted at bootstrap using table dyn.workorders. // - // p.s. replaces garbage code that looked like it was written by a crack head with face boils. + // p.s. replaces garbage code that looked like it was written by a mental patient with face boils. FORGE_MANAGER; @@ -58,9 +58,13 @@ public enum ForgeManager implements Runnable { try { workOrder = forge.take(); + // This workOrder has completed production. + if (workOrder.total_produced >= workOrder.total_to_produce) { - // Complete this workOrder. + // Set items as completed in the window. + // First CONFIRM_PRODUCE adds virtual item to the interface. + // Second CONFIRM_PRODUCE sets virtual item to complete. for (Item workOrderItem : workOrder.cooking) { workOrderItem.flags.add(mbEnums.ItemFlags.Identified);