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
+61 -62
View File
@@ -7,79 +7,78 @@ import engine.math.Vector3fImmutable;
import engine.objects.*;
public class GateInfoCmd extends AbstractDevCmd {
public GateInfoCmd() {
public GateInfoCmd() {
super("gateinfo");
}
// AbstractDevCmd Overridden methods
@Override
protected void _doCmd(PlayerCharacter player, String[] args,
AbstractGameObject target) {
Building targetBuilding;
String outString;
Runegate runeGate;
Blueprint blueprint;
String newline = "\r\n ";
targetBuilding = (Building)target;
if (targetBuilding.getObjectType() != GameObjectType.Building) {
throwbackInfo(player, "GateInfo: target must be a Building");
throwbackInfo(player, "Found" + targetBuilding.getObjectType().toString());
return;
}
// AbstractDevCmd Overridden methods
blueprint = Blueprint._meshLookup.get(targetBuilding.getMeshUUID());
@Override
protected void _doCmd(PlayerCharacter player, String[] args,
AbstractGameObject target) {
if (blueprint == null ||
(blueprint.getBuildingGroup() != BuildingGroup.RUNEGATE)){
throwbackInfo(player, "showgate: target must be a Runegate");
return;
}
Building targetBuilding;
String outString;
Runegate runeGate;
Blueprint blueprint;
String newline = "\r\n ";
targetBuilding = (Building) target;
runeGate = Runegate._runegates.get(targetBuilding.getObjectUUID());
outString = "RungateType: " + runeGate.gateBuilding.getName();
outString += newline;
outString += "Portal State:";
outString += newline;
for (Portal portal : runeGate.getPortals()) {
outString += "Portal: " + portal.portalType.name();
outString += " Active: " + portal.isActive();
outString += " Dest: " + portal.targetGate.getName();
outString += newline;
outString += " Origin: " + portal.getPortalLocation().x + 'x';
outString += " " + portal.getPortalLocation().y + 'y';
outString += newline;
Vector3fImmutable offset = portal.getPortalLocation().subtract(targetBuilding.getLoc());
outString += " Offset: " + offset.x + "x " + offset.z + 'y';
outString += newline;
outString += newline;
}
outString += newline;
throwbackInfo(player, outString);
if (targetBuilding.getObjectType() != GameObjectType.Building) {
throwbackInfo(player, "GateInfo: target must be a Building");
throwbackInfo(player, "Found" + targetBuilding.getObjectType().toString());
return;
}
@Override
protected String _getHelpString() {
return "Displays a runegate's gate status";
}
blueprint = Blueprint._meshLookup.get(targetBuilding.getMeshUUID());
@Override
protected String _getUsageString() {
if (blueprint == null ||
(blueprint.getBuildingGroup() != BuildingGroup.RUNEGATE)) {
throwbackInfo(player, "showgate: target must be a Runegate");
return;
}
runeGate = Runegate._runegates.get(targetBuilding.getObjectUUID());
outString = "RungateType: " + runeGate.gateBuilding.getName();
outString += newline;
outString += "Portal State:";
outString += newline;
for (Portal portal : runeGate.getPortals()) {
outString += "Portal: " + portal.portalType.name();
outString += " Active: " + portal.isActive();
outString += " Dest: " + portal.targetGate.getName();
outString += newline;
outString += " Origin: " + portal.getPortalLocation().x + 'x';
outString += " " + portal.getPortalLocation().y + 'y';
outString += newline;
Vector3fImmutable offset = portal.getPortalLocation().subtract(targetBuilding.getLoc());
outString += " Offset: " + offset.x + "x " + offset.z + 'y';
outString += newline;
outString += newline;
}
outString += newline;
throwbackInfo(player, outString);
}
@Override
protected String _getHelpString() {
return "Displays a runegate's gate status";
}
@Override
protected String _getUsageString() {
return "/gateinfo <target runegate> \n";
}
}
}