From 195a7e2cea94c91137b7ab335102e36c1f184164 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 24 Apr 2023 17:28:21 -0400 Subject: [PATCH] Devcmd now displays inbuilding loc. --- src/engine/devcmd/cmds/SlotTestCmd.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/engine/devcmd/cmds/SlotTestCmd.java b/src/engine/devcmd/cmds/SlotTestCmd.java index 3058b5d6..fd566b9a 100644 --- a/src/engine/devcmd/cmds/SlotTestCmd.java +++ b/src/engine/devcmd/cmds/SlotTestCmd.java @@ -15,6 +15,7 @@ import engine.devcmd.AbstractDevCmd; import engine.gameManager.BuildingManager; import engine.gameManager.ChatManager; import engine.objects.*; +import javafx.collections.ModifiableObservableListBase; public class SlotTestCmd extends AbstractDevCmd { @@ -48,8 +49,20 @@ public class SlotTestCmd extends AbstractDevCmd { for (AbstractCharacter hireling : building.getHirelings().keySet()) { + NPC npc; + Mob mob; + outString += "\r\n" + hireling.getName() + " slot " + building.getHirelings().get(hireling); - outString += "\r\n" + "location " + hireling.getLoc(); + + if (hireling.getObjectType().equals(GameObjectType.NPC)) { + npc = (NPC) hireling; + outString += "\r\n" + "location " + npc.inBuildingLoc.toString(); + continue; + } + + mob = (Mob) hireling; + + outString += "\r\n" + "location " + mob.inBuildingLoc.toString(); } }