diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 99d1b082..57516224 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -25,9 +25,9 @@ public enum ForgeManager implements Runnable { FORGE_MANAGER; - private static final BlockingQueue workOrders = new DelayQueue(); + private static final BlockingQueue oven = new DelayQueue<>(); public static final AtomicInteger wordOrderCounter = new AtomicInteger(0); - public static HashMap oven = new HashMap(); + public static final HashMap workOrderMap = new HashMap(); @Override public void run() { @@ -35,7 +35,7 @@ public enum ForgeManager implements Runnable { while (true) { try { - WorkOrder workOrder = workOrders.take(); + WorkOrder workOrder = oven.take(); // Completed or canceled work orders are not re-enqueued @@ -67,7 +67,7 @@ public enum ForgeManager implements Runnable { // until all items for this workOrder are completed. workOrder.completionTime = System.currentTimeMillis() + workOrder.rollingDuration; - workOrders.add(workOrder); + oven.add(workOrder); Logger.info(workOrder.toString()); } catch (InterruptedException e) { @@ -109,7 +109,7 @@ public enum ForgeManager implements Runnable { Logger.info(workOrder.toString()); workOrder.vendor.workOrders.add(workOrder); - workOrders.add(workOrder); + oven.add(workOrder); } public static boolean validate(PlayerCharacter playerCharacter, WorkOrder workOrder) { @@ -268,7 +268,7 @@ public enum ForgeManager implements Runnable { for (int i = 0; i < workOrder.slots_used; ++i) { Item forged_item = forgeItem(workOrder); - ForgeManager.oven.put(forged_item, workOrder); + ForgeManager.workOrderMap.put(forged_item, workOrder); workOrder.cooking.add(forged_item);