forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
package engine.devcmd.cmds;
|
||||
|
||||
import engine.Enum.GameObjectType;
|
||||
@@ -21,42 +20,40 @@ import engine.objects.PlayerCharacter;
|
||||
|
||||
public class convertLoc extends AbstractDevCmd {
|
||||
|
||||
public convertLoc() {
|
||||
public convertLoc() {
|
||||
super("convertLoc");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
|
||||
|
||||
if (target == null){
|
||||
Vector3fImmutable convertLoc = ZoneManager.findSmallestZone(pc.getLoc()).getLoc().subtract(pc.getLoc());
|
||||
ChatManager.chatSystemInfo(pc, Vector3fImmutable.toString(convertLoc));
|
||||
return;
|
||||
}
|
||||
if (target == null) {
|
||||
Vector3fImmutable convertLoc = ZoneManager.findSmallestZone(pc.getLoc()).getLoc().subtract(pc.getLoc());
|
||||
ChatManager.chatSystemInfo(pc, Vector3fImmutable.toString(convertLoc));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (target.getObjectType() != GameObjectType.Building)
|
||||
return;
|
||||
Building toConvert = (Building)target;
|
||||
Vector3fImmutable convertedLoc = ZoneManager.convertWorldToLocal(toConvert, pc.getLoc());
|
||||
ChatManager.chatSystemInfo(pc, Vector3fImmutable.toString(convertedLoc));
|
||||
if (target.getObjectType() != GameObjectType.Building)
|
||||
return;
|
||||
Building toConvert = (Building) target;
|
||||
Vector3fImmutable convertedLoc = ZoneManager.convertWorldToLocal(toConvert, pc.getLoc());
|
||||
ChatManager.chatSystemInfo(pc, Vector3fImmutable.toString(convertedLoc));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@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";
|
||||
|
||||
@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";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user