Warehosue cleanup

This commit is contained in:
2024-01-24 20:03:27 -06:00
parent 92d8ed9e3f
commit cc1e0d8986
20 changed files with 1038 additions and 1425 deletions
+4 -4
View File
@@ -224,7 +224,7 @@ public enum BuildingManager {
break;
case WAREHOUSE:
Warehouse warehouse = Warehouse.warehouseByBuildingUUID.get(building.getObjectUUID());
Warehouse warehouse = WarehouseManager.warehouseByBuildingUUID.get(building.getObjectUUID());
if (warehouse == null)
return false;
@@ -234,15 +234,15 @@ public enum BuildingManager {
ChatManager.chatSystemInfo(player, "You can not carry any more of that item.");
return false;
}
if (warehouse.getResources().get(resourceBase) == null)
if (warehouse.resources.get(resourceBase) == null)
continue;
int resourceAmount = warehouse.getResources().get(resourceBase);
int resourceAmount = warehouse.resources.get(resourceBase);
if (resourceAmount <= 0)
continue;
if (warehouse.loot(player, resourceBase, resourceAmount, true))
if (WarehouseManager.loot(warehouse, player, resourceBase, resourceAmount, true))
ChatManager.chatInfoInfo(player, "You have looted " + resourceAmount + ' ' + resourceBase.getName());
}
break;