diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index b546fac0..b84c2ac2 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -378,8 +378,6 @@ public enum ForgeManager implements Runnable { if (workOrder.production_cost_total.get(mbEnums.ResourceType.GOLD) > strongbox) { - // Deduct total cost from warehouse - if (workOrder.vendor.building.getCity() == null) return false; @@ -388,6 +386,8 @@ public enum ForgeManager implements Runnable { if (warehouse == null) return false; + // Deduct total cost from warehouse + workOrder.production_cost_total.forEach((key, value) -> warehouse.resources.put(key, warehouse.resources.get(key) - value)); DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse); }