From 7a3e3b394bf30eb5360d496b053550c7240f33ed Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 2 May 2023 14:44:22 -0400 Subject: [PATCH] Slot two is reserved on arty towers. --- src/engine/gameManager/BuildingManager.java | 8 ++++++++ src/engine/objects/NPC.java | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 95984cb3..f2928afe 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -50,6 +50,14 @@ public enum BuildingManager { int numOfSlots = _slotLocations.get(building.meshUUID).size(); for (int i = 1; i <= numOfSlots; i++) { + + // Slot two is reserved on Arty towers for the trebuchet + + if (i == 2 && + building.getBlueprint() != null && + building.getBlueprint().getBuildingGroup().equals(BuildingGroup.ARTYTOWER)) + continue; + if (!building.getHirelings().containsValue(i)) return i; } diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 76b37dd8..c0b5169d 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -356,12 +356,6 @@ public class NPC extends AbstractCharacter { if (slot == -1) Logger.error("No available slot for NPC: " + this.getObjectUUID()); - // Slot one is reserved on Arty towers for the trebuchet - - if (building.getBlueprint() != null && - building.getBlueprint().getBuildingGroup().equals(BuildingGroup.ARTYTOWER)) - slot = slot + 1; - building.getHirelings().put(this, slot); // Override bind and location for this npc derived