From adaa521bf55e8f31a94c292d9fb8877de7f11a20 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 25 Apr 2024 08:49:13 -0400 Subject: [PATCH] Comment cleanup --- src/engine/gameManager/ForgeManager.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index cc1a5014..8be55c54 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -28,6 +28,15 @@ import java.util.concurrent.atomic.AtomicInteger; public enum ForgeManager implements Runnable { + // MB Dev notes: + // Class handles all forge rolling requests for the game. + // + // WorkOrders may be submitted from any thread: usually (ItemProductionMsgHandler) + // as concurrency is managed by the same lock used by the warehouse (city.cityTransactionLock) + // WorkOrders are persisted then reconstituted at bootstrap from table dyn.workorders + // + // p.s. this class replaces garbage that looked like it was written by a crack head. + FORGE_MANAGER; public static final BlockingQueue forge = new DelayQueue<>(); @@ -39,7 +48,7 @@ public enum ForgeManager implements Runnable { public void run() { - WorkOrder workOrder = null; + WorkOrder workOrder; while (true) { @@ -363,7 +372,7 @@ public enum ForgeManager implements Runnable { int modifier = 0; ModTypeTableEntry modTypeTableEntry = null; - ModTableEntry modTableEntry = null; + ModTableEntry modTableEntry; int rollForModifier; switch (itemModType) {