From 746a95e7d57e54d241f4f5021023dc6efc00016f Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 22 Apr 2024 07:44:47 -0400 Subject: [PATCH] Overflow calc updated --- src/engine/gameManager/ForgeManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index e35d4007..b9bc3d7a 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -367,9 +367,8 @@ public enum ForgeManager implements Runnable { public static boolean debitWorkOrderCost(WorkOrder workOrder) { int strongbox = workOrder.vendor.building.getStrongboxValue(); - int overflow = strongbox - workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD); - if (overflow > 1 || workOrder.production_cost_total.size() > 1) { + if (workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) > strongbox) { // Deduct total cost from warehouse