From 86e9e7f0e1c60d17396d3153fbb9f767206f7d23 Mon Sep 17 00:00:00 2001 From: cwspain Date: Wed, 15 Nov 2023 14:35:01 -0600 Subject: [PATCH 1/3] Disallow facing changes for jumpships in the same turn that they change velocity. --- megamek/src/megamek/common/MoveStep.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/megamek/src/megamek/common/MoveStep.java b/megamek/src/megamek/common/MoveStep.java index 9618436dd16..08cf7c21cae 100644 --- a/megamek/src/megamek/common/MoveStep.java +++ b/megamek/src/megamek/common/MoveStep.java @@ -1958,6 +1958,13 @@ private void compileIllegal(final Game game, final Entity entity, && (velocity != 0) && (getNTurns() > 1)) { return; } + + // Jumpships cannot change velocity and use attitude jets in the same turn. + if ((a instanceof Jumpship) && ((Jumpship) a).hasStationKeepingDrive() + && (prev.getMovementType(false) == EntityMovementType.MOVE_OVER_THRUST) + && ((type == MoveStepType.TURN_LEFT) || (type == MoveStepType.TURN_RIGHT))) { + return; + } } // atmosphere has its own rules about turning From af2dd8f25b7852c21908440609af48a51e1ecd03 Mon Sep 17 00:00:00 2001 From: cwspain Date: Wed, 15 Nov 2023 15:03:55 -0600 Subject: [PATCH 2/3] Disallow accn/decn for jumpships after facing changes. --- megamek/src/megamek/client/ui/swing/MovementDisplay.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/megamek/src/megamek/client/ui/swing/MovementDisplay.java b/megamek/src/megamek/client/ui/swing/MovementDisplay.java index 71ba509c442..2e9a5750967 100644 --- a/megamek/src/megamek/client/ui/swing/MovementDisplay.java +++ b/megamek/src/megamek/client/ui/swing/MovementDisplay.java @@ -2490,6 +2490,13 @@ private synchronized void updateSpeedButtons() { setAccNEnabled(false); } + // Disable accn/decn if a jumpship has changed facing + if ((a instanceof Jumpship) && ((Jumpship) a).hasStationKeepingDrive() + && (cmd.contains(MoveStepType.TURN_LEFT) || cmd.contains(MoveStepType.TURN_RIGHT))) { + setDecNEnabled(false); + setAccNEnabled(false); + } + // if in atmosphere, limit acceleration to 2x safe thrust if (!clientgui.getClient().getGame().getBoard().inSpace() && (vel == (2 * ce.getWalkMP()))) { From be62fdeda7347bda3405d8f1e1c21db9d3fad6a0 Mon Sep 17 00:00:00 2001 From: cwspain Date: Thu, 16 Nov 2023 10:08:10 -0600 Subject: [PATCH 3/3] Show accumulated thrust in movement string of tooltip. --- megamek/src/megamek/client/ui/swing/tooltip/UnitToolTip.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/megamek/src/megamek/client/ui/swing/tooltip/UnitToolTip.java b/megamek/src/megamek/client/ui/swing/tooltip/UnitToolTip.java index 7d46ea42e26..8228abe49a5 100644 --- a/megamek/src/megamek/client/ui/swing/tooltip/UnitToolTip.java +++ b/megamek/src/megamek/client/ui/swing/tooltip/UnitToolTip.java @@ -1600,6 +1600,8 @@ private static StringBuilder getMovement(Entity entity) { if (jumpMPModified > 0) { sMove += "/" + jumpMPModified; } + } else if ((entity instanceof Jumpship) && ((Jumpship) entity).hasStationKeepingDrive()) { + sMove += String.format("%s%1.1f", DOT_SPACER, ((Jumpship) entity).getAccumulatedThrust()); } sMove += DOT_SPACER;