From 8ff043b746b777bc530359b9c7849b204e44794a Mon Sep 17 00:00:00 2001 From: kuronekochomusuke Date: Sun, 8 Dec 2024 15:27:00 -0500 Subject: [PATCH 1/7] add tag for UnderWaterBridge --- megamek/src/megamek/utilities/BoardsTagger.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/megamek/src/megamek/utilities/BoardsTagger.java b/megamek/src/megamek/utilities/BoardsTagger.java index 457b37c696a..7d71818a005 100644 --- a/megamek/src/megamek/utilities/BoardsTagger.java +++ b/megamek/src/megamek/utilities/BoardsTagger.java @@ -92,7 +92,8 @@ public enum Tags { TAG_ARMOREDBUILDING("ArmoredBuilding"), TAG_IMPASSABLE("Impassable"), TAG_ELEVATOR("Elevator"), - TAG_MULTIPLETHEME("MultipleTheme"); + TAG_MULTIPLETHEME("MultipleTheme"), + TAG_UNDERWATERBRIDGE("UnderWaterBridge"); private String tagName; private static final Map internalTagMap; @@ -233,6 +234,7 @@ private static void tagBoard(File boardFile) { int impassable = 0; int elevator = 0; int multipleTheme = 0; + int underWaterBride = 0; for (int x = 0; x < board.getWidth(); x++) { for (int y = 0; y < board.getHeight(); y++) { @@ -291,6 +293,11 @@ private static void tagBoard(File boardFile) { } impassable += hex.containsTerrain(IMPASSABLE) ? 1 : 0; elevator += hex.containsTerrain(ELEVATOR) ? 1 : 0; + if (hex.containsTerrain(WATER) + && hex.containsTerrain(BRIDGE) + && (hex.terrainLevel(BRIDGE_ELEV) < hex.terrainLevel(WATER))) { + underWaterBride++; + } } } @@ -359,6 +366,7 @@ private static void tagBoard(File boardFile) { multipleTheme += snowTheme > 0 ? 1 : 0; multipleTheme += volcanic > 0 ? 1 : 0; matchingTags.put(Tags.TAG_MULTIPLETHEME, multipleTheme > 1); + matchingTags.put(Tags.TAG_UNDERWATERBRIDGE, underWaterBride > 0); // Remove (see below) any auto tags that might be present so that auto tags that // no longer apply From 087278c0c2dbdde880efc97d3613c8c8bbc40a47 Mon Sep 17 00:00:00 2001 From: psikomonkie <189469115+psikomonkie@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:10:25 -0500 Subject: [PATCH 2/7] Issue 6224: NPE when air fails maneuver and flies off map --- megamek/src/megamek/server/totalwarfare/MovePathHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/megamek/src/megamek/server/totalwarfare/MovePathHandler.java b/megamek/src/megamek/server/totalwarfare/MovePathHandler.java index bb0aaa246e8..e7ff875e51d 100644 --- a/megamek/src/megamek/server/totalwarfare/MovePathHandler.java +++ b/megamek/src/megamek/server/totalwarfare/MovePathHandler.java @@ -1561,6 +1561,7 @@ private void processSteps() { a.setStraightMoves(a.getStraightMoves() + 1); // make sure it didn't fly off the map if (!getGame().getBoard().contains(curPos)) { + curPos = curPos.translated(step.getFacing(), -1); //Return its position to on-map so it can be targeted this turn a.setCurrentVelocity(md.getFinalVelocity()); gameManager.processLeaveMap(md, true, Compute.roundsUntilReturn(getGame(), entity)); return; From 039ecf98ad5e06e6138d81f1f5b3f402521fdf04 Mon Sep 17 00:00:00 2001 From: kuronekochomusuke Date: Fri, 13 Dec 2024 19:12:05 -0500 Subject: [PATCH 3/7] fix typo --- megamek/src/megamek/utilities/BoardsTagger.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/megamek/src/megamek/utilities/BoardsTagger.java b/megamek/src/megamek/utilities/BoardsTagger.java index 7d71818a005..9c7acb2ff81 100644 --- a/megamek/src/megamek/utilities/BoardsTagger.java +++ b/megamek/src/megamek/utilities/BoardsTagger.java @@ -234,7 +234,7 @@ private static void tagBoard(File boardFile) { int impassable = 0; int elevator = 0; int multipleTheme = 0; - int underWaterBride = 0; + int underWaterBridge = 0; for (int x = 0; x < board.getWidth(); x++) { for (int y = 0; y < board.getHeight(); y++) { @@ -296,7 +296,7 @@ private static void tagBoard(File boardFile) { if (hex.containsTerrain(WATER) && hex.containsTerrain(BRIDGE) && (hex.terrainLevel(BRIDGE_ELEV) < hex.terrainLevel(WATER))) { - underWaterBride++; + underWaterBridge++; } } } @@ -366,7 +366,7 @@ private static void tagBoard(File boardFile) { multipleTheme += snowTheme > 0 ? 1 : 0; multipleTheme += volcanic > 0 ? 1 : 0; matchingTags.put(Tags.TAG_MULTIPLETHEME, multipleTheme > 1); - matchingTags.put(Tags.TAG_UNDERWATERBRIDGE, underWaterBride > 0); + matchingTags.put(Tags.TAG_UNDERWATERBRIDGE, underWaterBridge > 0); // Remove (see below) any auto tags that might be present so that auto tags that // no longer apply From b42e4df5d69d4130f285f78a9e4f5e3c782448cb Mon Sep 17 00:00:00 2001 From: Scoppio Date: Sat, 14 Dec 2024 00:33:04 -0300 Subject: [PATCH 4/7] feat: env var mm.profile=dev makes log print on console --- megamek/mmconf/log4j2.xml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/megamek/mmconf/log4j2.xml b/megamek/mmconf/log4j2.xml index 7838144ad15..4b04808b0d7 100644 --- a/megamek/mmconf/log4j2.xml +++ b/megamek/mmconf/log4j2.xml @@ -5,7 +5,7 @@ - + @@ -17,28 +17,30 @@ + - + - + - + - + - + + From df297eb652b94fc0497fdcf29501b91fbeef1630 Mon Sep 17 00:00:00 2001 From: SJuliez Date: Sat, 14 Dec 2024 08:26:21 +0100 Subject: [PATCH 5/7] Update history.txt --- megamek/docs/history.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/megamek/docs/history.txt b/megamek/docs/history.txt index 907d4b8e7dc..787af519023 100644 --- a/megamek/docs/history.txt +++ b/megamek/docs/history.txt @@ -8,7 +8,7 @@ MEGAMEK VERSION HISTORY: + Fix #5086: Updated SRMAXHandler to ignore specialty armors + PR #6209: Implement RISC laser pulse module + Fix #6211: Added null check for lastUnitMember -+ PR #6203: Dev Tool to Find duplicate boards ++ PR #6203, #6266: Dev Tools: to Find duplicate boards, log to console with environment variable mm.profile=dev + PR #6181: Rename TroopSpace to InfantryCompartment + Fix #6217: Too many gunners for aerospace in MekHQ + Fix #6069: Stops bays from loading BA and protomek ammunition From 6234f4bc198e74d1df7638b2265accf371c7701a Mon Sep 17 00:00:00 2001 From: SJuliez Date: Sat, 14 Dec 2024 08:28:25 +0100 Subject: [PATCH 6/7] Update history.txt --- megamek/docs/history.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/megamek/docs/history.txt b/megamek/docs/history.txt index 787af519023..c3f21135305 100644 --- a/megamek/docs/history.txt +++ b/megamek/docs/history.txt @@ -24,6 +24,7 @@ MEGAMEK VERSION HISTORY: + Fix #3018: Fixes Battle Armor Plasma Rifles not applying TacOps Optional Rules + Fix #3827: Fixes target's side's ECM not effecting sensor spottingFixes + Fix: Disable Simultaneous Movement due to numerous issues ++ PR #6250: Adds an automatic board tag for underwater bridges 0.50.01 (2024-11-10 1800 UTC) + PR #5962, #5964, #5966, #5974, #5931, #5983, #6154, #6159: Internal code changes (TWGameManager, extract processMovement, allow more classes for InputFilter, Victory, move test scenarios to testresources), From ae8cbb8bbe2f66de79e2c0cfe6c300a42366ac02 Mon Sep 17 00:00:00 2001 From: SJuliez Date: Sat, 14 Dec 2024 08:32:17 +0100 Subject: [PATCH 7/7] Update history.txt --- megamek/docs/history.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/megamek/docs/history.txt b/megamek/docs/history.txt index c3f21135305..07ef0825455 100644 --- a/megamek/docs/history.txt +++ b/megamek/docs/history.txt @@ -25,6 +25,7 @@ MEGAMEK VERSION HISTORY: + Fix #3827: Fixes target's side's ECM not effecting sensor spottingFixes + Fix: Disable Simultaneous Movement due to numerous issues + PR #6250: Adds an automatic board tag for underwater bridges ++ Fix #6224, #6248: Aircraft that fly off are now nudged back onto the board to be targetable before actually leaving the map 0.50.01 (2024-11-10 1800 UTC) + PR #5962, #5964, #5966, #5974, #5931, #5983, #6154, #6159: Internal code changes (TWGameManager, extract processMovement, allow more classes for InputFilter, Victory, move test scenarios to testresources),