forked from MagicBane/Server
new region lookup
This commit is contained in:
@@ -11,6 +11,7 @@ package engine.devcmd.cmds;
|
||||
|
||||
import engine.Enum;
|
||||
import engine.devcmd.AbstractDevCmd;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.objects.*;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
@@ -25,6 +26,12 @@ public class RegionCmd extends AbstractDevCmd {
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
|
||||
Building building = BuildingManager.getBuildingAtLocation(((AbstractCharacter) target).loc);
|
||||
if(building == null){
|
||||
this.throwbackInfo(pc, "No Building At This Location.") ;
|
||||
} else{
|
||||
this.throwbackInfo(pc, "Building At Location: " + building.getName());
|
||||
}
|
||||
Regions region = ((AbstractCharacter)target).region;
|
||||
if (region == null) {
|
||||
this.throwbackInfo(pc, "No Region Found.");
|
||||
|
||||
Reference in New Issue
Block a user