Files
magicbane/src/engine/devcmd/cmds/GetHeightCmd.java
T

57 lines
2.3 KiB
Java
Raw Normal View History

2022-04-30 09:41:17 -04:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.devcmd.cmds;
import engine.InterestManagement.HeightMap;
import engine.devcmd.AbstractDevCmd;
import engine.gameManager.ZoneManager;
import engine.objects.AbstractGameObject;
import engine.objects.PlayerCharacter;
import engine.objects.Zone;
public class GetHeightCmd extends AbstractDevCmd {
public GetHeightCmd() {
super("getHeight");
this.addCmdString("height");
}
@Override
2023-09-11 11:08:03 -04:00
protected void _doCmd(PlayerCharacter playerCharacter, String[] words,
2022-04-30 09:41:17 -04:00
AbstractGameObject target) {
2023-09-11 11:08:03 -04:00
Zone currentZone;
Zone parentZone;
2022-04-30 09:41:17 -04:00
2023-09-11 11:08:03 -04:00
currentZone = ZoneManager.findSmallestZone(playerCharacter.getLoc());
2023-09-11 12:08:39 -04:00
parentZone = HeightMap.getNextZoneWithTerrain(currentZone.getParent());
2022-04-30 09:41:17 -04:00
2023-09-11 11:08:03 -04:00
float currentHeight = HeightMap.getWorldHeight(currentZone, playerCharacter.getLoc());
float parentHeight = HeightMap.getWorldHeight(parentZone, playerCharacter.getLoc());
2022-04-30 09:41:17 -04:00
2023-09-11 13:50:56 -04:00
this.throwbackInfo(playerCharacter, "Zone : " + currentZone.getName());
this.throwbackInfo(playerCharacter, "Altitude : " + currentHeight);
this.throwbackInfo(playerCharacter, "Parent : " + currentZone.getName());
this.throwbackInfo(playerCharacter, "Altitude : " + parentHeight);
2023-09-11 11:08:03 -04:00
this.throwbackInfo(playerCharacter, "Character Height: " + playerCharacter.getCharacterHeight());
2022-04-30 09:41:17 -04:00
}
@Override
protected String _getHelpString() {
return "Temporarily Changes SubRace";
}
@Override
protected String _getUsageString() {
return "' /subrace mobBaseID";
}
}