From d7ac838b6d786e1ca217f4cf6c1aa2a1c6ba35b3 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 23 Apr 2024 12:11:04 -0400 Subject: [PATCH] Simplified lambda function --- src/engine/gameManager/ForgeManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 5221498c..756cbbae 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -130,7 +130,7 @@ public enum ForgeManager implements Runnable { // Set total cost for this production run workOrder.production_cost_total.putAll(workOrder.production_cost); - workOrder.production_cost_total.forEach((key, value) -> workOrder.production_cost_total.compute(key, (k, v) -> v * workOrder.total_to_produce)); + workOrder.production_cost_total.forEach((key, value) -> workOrder.production_cost_total.put(key, value * workOrder.total_to_produce)); // Deduct gold cost from building