From aeb21c328e50cd0fc0bb9f122bfeed4d734cc079 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 11 Jun 2024 21:21:54 -0500 Subject: [PATCH] max slots for rank adjustments --- src/engine/gameManager/BuildingManager.java | 7 ++++++- src/engine/objects/Blueprint.java | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 5633df05..d0e71883 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -520,7 +520,12 @@ public enum BuildingManager { if (building.getBlueprintUUID() == 0) return false; - if (building.getBlueprint().getMaxSlots() == building.getHirelings().size()) + int maxSlots = building.getBlueprint().getMaxSlots(); + if(building.getBlueprint().getBuildingGroup() != null) { + building.getBlueprint().getSlotsForRank(building.getRank()); + } + + if (maxSlots == building.getHirelings().size()) return false; String pirateName = NPCManager.getPirateName(contract.getMobbaseID()); diff --git a/src/engine/objects/Blueprint.java b/src/engine/objects/Blueprint.java index 15777c27..6b3ec844 100644 --- a/src/engine/objects/Blueprint.java +++ b/src/engine/objects/Blueprint.java @@ -327,20 +327,20 @@ public class Blueprint { break; case 3: case 4: - case 5: - case 6: availableSlots = 2; break; + case 5: + case 6: case 7: - availableSlots = 3; - break; case 8: - availableSlots = 1; + availableSlots = 3; break; default: availableSlots = 0; break; } + if(this.buildingGroup != null && this.buildingGroup.equals(BuildingGroup.TOL)) + availableSlots += 1; return availableSlots; }