From a572a5fbf945bfde542cdf24ca5b704c13b4f20d Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 24 Feb 2023 00:42:34 -0500 Subject: [PATCH] Available hotZones added to devcmd. --- src/engine/devcmd/cmds/HotzoneCmd.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/engine/devcmd/cmds/HotzoneCmd.java b/src/engine/devcmd/cmds/HotzoneCmd.java index 8dc61b5a..d3389750 100644 --- a/src/engine/devcmd/cmds/HotzoneCmd.java +++ b/src/engine/devcmd/cmds/HotzoneCmd.java @@ -31,10 +31,11 @@ public class HotzoneCmd extends AbstractDevCmd { } @Override - protected void _doCmd(PlayerCharacter pc, String[] words, + protected void _doCmd(PlayerCharacter playerCharacter, String[] words, AbstractGameObject target) { StringBuilder data = new StringBuilder(); + String outString; for (String s : words) { data.append(s); @@ -44,17 +45,25 @@ public class HotzoneCmd extends AbstractDevCmd { String input = data.toString().trim(); if (input.length() == 0) { - throwbackInfo(pc, "Current hotZone: " + ZoneManager.hotZone.getName()); + outString = "Current hotZone: " + ZoneManager.hotZone.getName() + "\r\n"; + outString += "Available hotZones: " + ZoneManager.availableHotZones(); + throwbackInfo(playerCharacter, outString); return; } if (input.equalsIgnoreCase("random")) { ZoneManager.generateAndSetRandomHotzone(); - throwbackInfo(pc, "New hotZone: " + ZoneManager.hotZone.getName()); + outString = "New hotZone: " + ZoneManager.hotZone.getName() + "\r\n"; + outString += "Available hotZones: " + ZoneManager.availableHotZones(); + throwbackInfo(playerCharacter, outString); + return; } - if (input.equalsIgnoreCase("reset")) + if (input.equalsIgnoreCase("reset")) { ZoneManager.resetHotZones(); + throwbackInfo(playerCharacter, "Available hotZones: " + ZoneManager.availableHotZones()); + return; + } return; }