forked from MagicBane/Server
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.4 KiB
65 lines
2.4 KiB
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . |
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· |
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ |
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ |
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ |
|
// Magicbane Emulator Project © 2013 - 2022 |
|
// www.magicbane.com |
|
|
|
|
|
package engine.devcmd.cmds; |
|
|
|
import engine.Enum; |
|
import engine.devcmd.AbstractDevCmd; |
|
import engine.gameManager.BuildingManager; |
|
import engine.objects.*; |
|
|
|
import java.lang.reflect.Field; |
|
|
|
public class RegionCmd extends AbstractDevCmd { |
|
|
|
public RegionCmd() { |
|
super("region"); |
|
} |
|
|
|
@Override |
|
protected void _doCmd(PlayerCharacter pc, String[] words, |
|
AbstractGameObject target) { |
|
|
|
String newline = "\r\n "; |
|
String output; |
|
output = "Target Region Information:" + newline; |
|
|
|
Building building = BuildingManager.getBuildingAtLocation(((AbstractCharacter) target).loc); |
|
if(building == null){ |
|
this.throwbackInfo(pc, "No Building At This Location.") ; |
|
} |
|
Regions region = ((AbstractCharacter)target).region; |
|
if (region == null) { |
|
this.throwbackInfo(pc, "No Region Found."); |
|
return; |
|
} |
|
|
|
if(region != null) { |
|
output += "Player Info: " + ((AbstractCharacter) target).getName() + newline; |
|
output += "Region Building: " + building.getName() + newline; |
|
output += "Region Height: " + region.lerpY((AbstractCharacter)target) + newline; |
|
output += "is Stairs: " + region.isStairs() + newline; |
|
output += "is Outside: " + region.isOutside(); |
|
this.throwbackInfo(pc, output); |
|
} |
|
|
|
} |
|
|
|
@Override |
|
protected String _getHelpString() { |
|
return "Temporarily Changes SubRace"; |
|
} |
|
|
|
@Override |
|
protected String _getUsageString() { |
|
return "' /setBuildingCollidables add/remove 'add creates a collision line.' needs 4 integers. startX, endX, startY, endY"; |
|
|
|
} |
|
|
|
}
|
|
|