From 7193ff7698cb3ec71b43f974c4a7abec8bc087b5 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 9 May 2024 14:12:55 -0400 Subject: [PATCH] Withdraw logic cleanup --- src/engine/loot/WorkOrder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/loot/WorkOrder.java b/src/engine/loot/WorkOrder.java index 2871dd0d..b78604c7 100644 --- a/src/engine/loot/WorkOrder.java +++ b/src/engine/loot/WorkOrder.java @@ -174,7 +174,8 @@ public class WorkOrder implements Delayed { } else { int overflowAmount = workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - strongbox; workOrder.vendor.building.setStrongboxValue(0); - modified_production_cost.put(mbEnums.ResourceType.GOLD, workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - overflowAmount); + int adjustedAmount = workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - overflowAmount; + modified_production_cost.put(mbEnums.ResourceType.GOLD, adjustedAmount); } // Deduct total production cost from warehouse