From f465ea4045091c18ac559a5615fa521304b2ea10 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 9 May 2024 11:32:26 -0400 Subject: [PATCH] Withdraw logic cleanup --- src/engine/loot/WorkOrder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/loot/WorkOrder.java b/src/engine/loot/WorkOrder.java index 0f269254..52631680 100644 --- a/src/engine/loot/WorkOrder.java +++ b/src/engine/loot/WorkOrder.java @@ -165,9 +165,9 @@ public class WorkOrder implements Delayed { if (warehouse == null) return false; - int remainingAmount = workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - strongbox; + int overflowAmount = workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - strongbox; workOrder.vendor.building.setStrongboxValue(0); - workOrder.production_cost_total.put(mbEnums.ResourceType.GOLD, workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - remainingAmount); + workOrder.production_cost_total.put(mbEnums.ResourceType.GOLD, workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) - overflowAmount); // Deduct total production cost from warehouse