Code cleanup

This commit is contained in:
LemADEC 2017-05-29 16:45:31 +02:00
parent 4ea39b2114
commit 0a02b6e188

View file

@ -830,7 +830,7 @@ public class TileEntityShipCore extends TileEntityAbstractEnergy implements ISta
if (shipMass < WarpDriveConfig.SHIP_VOLUME_MIN_FOR_HYPERSPACE) { if (shipMass < WarpDriveConfig.SHIP_VOLUME_MIN_FOR_HYPERSPACE) {
Jumpgate nearestGate = null; Jumpgate nearestGate = null;
if (WarpDrive.jumpgates == null) { if (WarpDrive.jumpgates == null) {
WarpDrive.logger.warn(this + " WarpDrive.instance.jumpGates is NULL!"); WarpDrive.logger.warn(this + " WarpDrive.jumpGates is NULL!");
} else { } else {
nearestGate = WarpDrive.jumpgates.findNearestGate(xCoord, yCoord, zCoord); nearestGate = WarpDrive.jumpgates.findNearestGate(xCoord, yCoord, zCoord);
} }
@ -838,7 +838,7 @@ public class TileEntityShipCore extends TileEntityAbstractEnergy implements ISta
StringBuilder reason = new StringBuilder(); StringBuilder reason = new StringBuilder();
if (nearestGate == null || !isShipInJumpgate(nearestGate, reason)) { if (nearestGate == null || !isShipInJumpgate(nearestGate, reason)) {
messageToAllPlayersOnShip("Ship is too small (" + shipMass + "/" + WarpDriveConfig.SHIP_VOLUME_MIN_FOR_HYPERSPACE messageToAllPlayersOnShip("Ship is too small (" + shipMass + "/" + WarpDriveConfig.SHIP_VOLUME_MIN_FOR_HYPERSPACE
+ ").\nInsufficient ship mass to open hyperspace portal.\nUse a jumpgate to reach or exit hyperspace."); + ").\nInsufficient ship mass to engage alcubierre drive.\nUse a jumpgate to reach or exit hyperspace.");
controller.setJumpFlag(false); controller.setJumpFlag(false);
return; return;
} }
@ -887,7 +887,7 @@ public class TileEntityShipCore extends TileEntityAbstractEnergy implements ISta
if (WarpDriveConfig.LOGGING_JUMP) { if (WarpDriveConfig.LOGGING_JUMP) {
WarpDrive.logger.info(this + " Movement adjusted to (" + moveX + " " + moveY + " " + moveZ + ") blocks."); WarpDrive.logger.info(this + " Movement adjusted to (" + moveX + " " + moveY + " " + moveZ + ") blocks.");
} }
JumpSequencer jump = new JumpSequencer(this, (currentMode == EnumShipCoreMode.HYPERSPACE), final JumpSequencer jump = new JumpSequencer(this, (currentMode == EnumShipCoreMode.HYPERSPACE),
moveX, moveY, moveZ, controller.getRotationSteps(), moveX, moveY, moveZ, controller.getRotationSteps(),
false, 0, 0, 0); false, 0, 0, 0);
jump.enable(); jump.enable();