From 03e6c591ff359b16fbe0fe99b56731eb25a7d7e9 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 28 Mar 2024 05:06:04 -0400 Subject: [PATCH] More itembase refactor --- src/engine/gameManager/MaintenanceManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/MaintenanceManager.java b/src/engine/gameManager/MaintenanceManager.java index 69dd7293..2b099699 100644 --- a/src/engine/gameManager/MaintenanceManager.java +++ b/src/engine/gameManager/MaintenanceManager.java @@ -14,7 +14,6 @@ package engine.gameManager; import engine.Enum; import engine.objects.Building; import engine.objects.City; -import engine.objects.ItemBase; import engine.objects.Warehouse; import org.pmw.tinylog.Logger; @@ -228,7 +227,7 @@ public enum MaintenanceManager { if ((overDraft > 0)) if ((building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.SHRINE) == false) && (warehouse != null) && building.assetIsProtected() == true && - (warehouse.resources.get(ItemBase.GOLD_ITEM_BASE)) >= overDraft) { + (warehouse.resources.get(Enum.ResourceType.GOLD)) >= overDraft) { hasFunds = true; } @@ -291,7 +290,7 @@ public enum MaintenanceManager { if (overDraft > 0) { - resourceValue = warehouse.resources.get(ItemBase.getItemBase(7)); + resourceValue = warehouse.resources.get(Enum.ResourceType.GOLD); warehouse.resources.put(Enum.ResourceType.GOLD, resourceValue - overDraft); if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) {