From 91eb0c314f6e3202d20282be488582e3f9ad4936 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 14 Sep 2023 10:14:31 -0400 Subject: [PATCH] SeAudit command created --- src/engine/devcmd/cmds/SeaAuditCmd.java | 43 +++++++++++++++++++++++ src/engine/gameManager/DevCmdManager.java | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/engine/devcmd/cmds/SeaAuditCmd.java diff --git a/src/engine/devcmd/cmds/SeaAuditCmd.java b/src/engine/devcmd/cmds/SeaAuditCmd.java new file mode 100644 index 00000000..5ec6a40f --- /dev/null +++ b/src/engine/devcmd/cmds/SeaAuditCmd.java @@ -0,0 +1,43 @@ +// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . +// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· +// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ +// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ +// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ +// Magicbane Emulator Project © 2013 - 2022 +// www.magicbane.com + + +package engine.devcmd.cmds; + +import engine.devcmd.AbstractDevCmd; +import engine.gameManager.ZoneManager; +import engine.objects.AbstractGameObject; +import engine.objects.PlayerCharacter; +import engine.objects.Zone; + +public class SeaAuditCmd extends AbstractDevCmd { + + public SeaAuditCmd() { + super("seaaudit"); + } + + @Override + protected void _doCmd(PlayerCharacter playerCharacter, String[] words, + AbstractGameObject target) { + + for (Zone zone : ZoneManager.getAllZones()) + if (zone.getSeaLevel() > zone.worldAltitude) + this.throwbackInfo(playerCharacter, zone.getObjectUUID() + zone.getName()); + } + + @Override + protected String _getHelpString() { + return "Queries heightmap engine"; + } + + @Override + protected String _getUsageString() { + return "' /getheight"; + } + +} diff --git a/src/engine/gameManager/DevCmdManager.java b/src/engine/gameManager/DevCmdManager.java index 803ad944..b6334361 100644 --- a/src/engine/gameManager/DevCmdManager.java +++ b/src/engine/gameManager/DevCmdManager.java @@ -144,7 +144,7 @@ public enum DevCmdManager { DevCmdManager.registerDevCmd(new ApplyBonusCmd()); DevCmdManager.registerDevCmd(new AuditFailedItemsCmd()); DevCmdManager.registerDevCmd(new SlotTestCmd()); - + DevCmdManager.registerDevCmd(new SeaAuditCmd()); } private static void registerDevCmd(AbstractDevCmd cmd) {