diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 0f159c0a..9d0ceca6 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -149,7 +149,11 @@ public enum ForgeManager implements Runnable { return false; } - // use Warehouse.caclulateOverdraft(workorder) method + if (calcCostOverflow(workOrder).isEmpty() == false) { + if (playerCharacter != null) + ErrorPopupMsg.sendErrorPopup(playerCharacter, 18); //18: You can't really afford that + return false; + } return true; } @@ -220,7 +224,7 @@ public enum ForgeManager implements Runnable { return production_cost; } - public static HashMap calculateCostOverflow(WorkOrder workOrder) { + public static HashMap calcCostOverflow(WorkOrder workOrder) { HashMap costMap = new HashMap<>(); Warehouse warehouse;