Skip to content

Commit

Permalink
Merge branch 'master' into game-options-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Scoppio authored Dec 14, 2024
2 parents b28bb1a + ae8cbb8 commit 5eed67e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
4 changes: 3 additions & 1 deletion megamek/docs/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,6 +24,8 @@ 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
+ 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),
Expand Down
14 changes: 8 additions & 6 deletions megamek/mmconf/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</Properties>

<Appenders>
<Console name="Console" target="SYSTEM_OUT" follow="true">
<Console name="dev">
<PatternLayout pattern="${layout}" />
</Console>
<File name="MegaMekLog" fileName="logs/megamek.log" append="false">
Expand All @@ -17,28 +17,30 @@
<File name="MekHQLog" fileName="logs/mekhq.log" append="false">
<PatternLayout pattern="${layout}" />
</File>
<Null name="null" />
</Appenders>

<Loggers>
<Logger name="megamek.client.bot" level="error" additivity="false">
<AppenderRef ref="MegaMekLog" />
<AppenderRef ref="Console" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Logger>
<Logger name="megamek" level="info" additivity="false">
<AppenderRef ref="MegaMekLog" />
<AppenderRef ref="Console" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Logger>
<Logger name="megameklab" level="info" additivity="false">
<AppenderRef ref="MegaMekLabLog" />
<AppenderRef ref="Console" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Logger>
<Logger name="mekhq" level="info" additivity="false">
<AppenderRef ref="MekHQLog" />
<AppenderRef ref="Console" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Logger>

<Root level="info">
<AppenderRef ref="Console" />
<AppenderRef ref="MegaMekLog" />
<AppenderRef ref="${env:mm.profile:-null}" />
</Root>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 9 additions & 1 deletion megamek/src/megamek/utilities/BoardsTagger.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Tags> internalTagMap;
Expand Down Expand Up @@ -233,6 +234,7 @@ private static void tagBoard(File boardFile) {
int impassable = 0;
int elevator = 0;
int multipleTheme = 0;
int underWaterBridge = 0;

for (int x = 0; x < board.getWidth(); x++) {
for (int y = 0; y < board.getHeight(); y++) {
Expand Down Expand Up @@ -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))) {
underWaterBridge++;
}
}
}

Expand Down Expand Up @@ -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, underWaterBridge > 0);

// Remove (see below) any auto tags that might be present so that auto tags that
// no longer apply
Expand Down

0 comments on commit 5eed67e

Please sign in to comment.