From 9efba13b03549eff01fa1bafec3c2d3ecd3f6b4a Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 23 Apr 2024 12:14:31 -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 756cbbae..b546fac0 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -388,7 +388,7 @@ public enum ForgeManager implements Runnable { if (warehouse == null) return false; - workOrder.production_cost_total.forEach((key, value) -> warehouse.resources.compute(key, (k, v) -> warehouse.resources.get(key) - value)); + workOrder.production_cost_total.forEach((key, value) -> warehouse.resources.put(key, warehouse.resources.get(key) - value)); DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse); } return true;