From a5255bcf11430b48ab4dd18e3ce95be1a8126d5c Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 8 May 2024 15:40:35 -0400 Subject: [PATCH] Simplify total cost calc --- 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 fc3b45b2..063bba1d 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -160,8 +160,7 @@ public enum ForgeManager implements Runnable { workOrder.total_to_produce *= workOrder.slots_used; workOrder.production_cost = calcProductionCost(workOrder); - workOrder.production_cost_total.putAll(workOrder.production_cost); - workOrder.production_cost_total.forEach((key, value) -> workOrder.production_cost_total.put(key, value * workOrder.total_to_produce)); + workOrder.production_cost.forEach((key, value) -> workOrder.production_cost_total.put(key, value * workOrder.total_to_produce)); // Withdraw gold and resource costs. Availability has previously been validated.