Project cleanup pre merge.

This commit is contained in:
2023-07-15 09:23:48 -04:00
parent 134b651df8
commit 9bbdef224d
747 changed files with 99704 additions and 101200 deletions
+34 -33
View File
@@ -17,47 +17,48 @@ import engine.objects.Zone;
public class GetOffsetCmd extends AbstractDevCmd {
public GetOffsetCmd() {
public GetOffsetCmd() {
super("getoffset");
}
@Override
protected void _doCmd(PlayerCharacter pcSender, String[] words,
AbstractGameObject target) {
if (pcSender == null) return;
@Override
protected void _doCmd(PlayerCharacter pcSender, String[] words,
AbstractGameObject target) {
if (pcSender == null)
return;
Zone zone = null;
try {
int loadID = Integer.parseInt(words[0]);
zone = ZoneManager.getZoneByZoneID(loadID);
if (zone == null) {
throwbackError(pcSender, "Error: can't find the zone of ID " + loadID + '.');
return;
}
} catch (Exception e) {
zone = ZoneManager.findSmallestZone(pcSender.getLoc());
}
Zone zone = null;
try {
int loadID = Integer.parseInt(words[0]);
zone = ZoneManager.getZoneByZoneID(loadID);
if (zone == null) {
throwbackError(pcSender, "Error: can't find the zone of ID " + loadID + '.');
return;
}
} catch (Exception e) {
zone = ZoneManager.findSmallestZone(pcSender.getLoc());
}
if (zone == null) {
throwbackError(pcSender, "Error: can't find the zone you're in.");
return;
}
if (zone == null) {
throwbackError(pcSender, "Error: can't find the zone you're in.");
return;
}
float difX = pcSender.getLoc().x - zone.absX;
float difY = pcSender.getLoc().y - zone.absY;
float difZ = pcSender.getLoc().z - zone.absZ;
float difX = pcSender.getLoc().x - zone.absX;
float difY = pcSender.getLoc().y - zone.absY;
float difZ = pcSender.getLoc().z - zone.absZ;
throwbackInfo(pcSender, zone.getName() + ": (x: " + difX + ", y: " + difY + ", z: " + difZ + ')');
}
throwbackInfo(pcSender, zone.getName() + ": (x: " + difX + ", y: " + difY + ", z: " + difZ + ')');
}
@Override
protected String _getUsageString() {
return "'./getoffset [zoneID]'";
}
@Override
protected String _getUsageString() {
return "'./getoffset [zoneID]'";
}
@Override
protected String _getHelpString() {
return "lists offset from center of zone";
}
@Override
protected String _getHelpString() {
return "lists offset from center of zone";
}
}