|
|
@ -49,19 +49,15 @@ public enum MaintenanceManager { |
|
|
|
|
|
|
|
|
|
|
|
if (chargeUpkeep(building) == false) |
|
|
|
if (chargeUpkeep(building) == false) |
|
|
|
derankList.add(building); |
|
|
|
derankList.add(building); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
setMaintDateTime(building, LocalDateTime.now().plusDays(7)); |
|
|
|
} |
|
|
|
} |
|
|
|
// Reset maintenance dates for these buildings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Building building : maintList) { |
|
|
|
for (Building building : derankList) { |
|
|
|
setMaintDateTime(building, LocalDateTime.now().plusDays(7)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// Derak or destroy buildings that did not
|
|
|
|
|
|
|
|
// have funds available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Building building : derankList) |
|
|
|
|
|
|
|
building.destroyOrDerank(null); |
|
|
|
building.destroyOrDerank(null); |
|
|
|
|
|
|
|
if(building.getRank() > 0) |
|
|
|
|
|
|
|
setMaintDateTime(building, LocalDateTime.now().plusDays(1)); |
|
|
|
|
|
|
|
} |
|
|
|
Logger.info("Structures: " + buildingList.size() + " Maint: " + maintList.size() + " Derank: " + derankList.size()); |
|
|
|
Logger.info("Structures: " + buildingList.size() + " Maint: " + maintList.size() + " Derank: " + derankList.size()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -98,6 +94,10 @@ public enum MaintenanceManager { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//only ToL pays maintenance
|
|
|
|
|
|
|
|
if(building.getBlueprint().getBuildingGroup() != null && !building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL)) |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
// No maintenance on banestones omfg
|
|
|
|
// No maintenance on banestones omfg
|
|
|
|
|
|
|
|
|
|
|
|
if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.BANESTONE)) |
|
|
|
if (building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.BANESTONE)) |
|
|
|