From 31c896b72ede4cbfde616916220b90b8a403d68a Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 18 Aug 2024 22:43:16 -0400 Subject: [PATCH] don't draw DZs in game, player table DZ display, text fix --- .../src/megamek/client/ui/swing/boardview/BoardView.java | 2 +- megamek/src/megamek/client/ui/swing/lobby/PlayerTable.java | 6 +++--- megamek/src/megamek/common/Terrains.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/megamek/src/megamek/client/ui/swing/boardview/BoardView.java b/megamek/src/megamek/client/ui/swing/boardview/BoardView.java index 773d6e4ddf1..1ae2bb0967e 100644 --- a/megamek/src/megamek/client/ui/swing/boardview/BoardView.java +++ b/megamek/src/megamek/client/ui/swing/boardview/BoardView.java @@ -2011,7 +2011,7 @@ private void drawHex(Coords c, Graphics boardGraph, boolean saveBoardImage) { } } - if (hex.containsTerrain(Terrains.DEPLOYMENT_ZONE) && (game == null)) { + if (hex.containsTerrain(Terrains.DEPLOYMENT_ZONE) && (game.getPhase().isUnknown())) { drawHexBorder(g, Color.yellow, 5, 5); drawCenteredString("DZ " + Board.exitsAsIntList(hex.getTerrain(Terrains.DEPLOYMENT_ZONE).getExits()), 0, (int) (50 * scale), font_note, g); diff --git a/megamek/src/megamek/client/ui/swing/lobby/PlayerTable.java b/megamek/src/megamek/client/ui/swing/lobby/PlayerTable.java index f7fa9a683be..97c9b947fe0 100644 --- a/megamek/src/megamek/client/ui/swing/lobby/PlayerTable.java +++ b/megamek/src/megamek/client/ui/swing/lobby/PlayerTable.java @@ -23,6 +23,7 @@ import megamek.client.ui.Messages; import megamek.client.ui.swing.GUIPreferences; import megamek.client.ui.swing.util.UIUtil; +import megamek.common.Board; import megamek.common.IStartingPositions; import megamek.common.Player; import megamek.common.options.GameOptions; @@ -224,9 +225,8 @@ public Component getTableCellRendererComponent(JTable table, Object value, boole result.append(", " + so); result.append(", " + sw); } - } else { - String msg_none = Messages.getString("ChatLounge.None"); - result.append(msg_start + ": " + msg_none); + } else if (player.getStartingPos() > IStartingPositions.START_LOCATION_NAMES.length) { + result.append(msg_start + ": " + "Zone " + Board.decodeCustomDeploymentZoneID(player.getStartingPos())); } result.append(""); diff --git a/megamek/src/megamek/common/Terrains.java b/megamek/src/megamek/common/Terrains.java index d25f0ad0e20..f8fc10ae0ec 100644 --- a/megamek/src/megamek/common/Terrains.java +++ b/megamek/src/megamek/common/Terrains.java @@ -392,7 +392,7 @@ public static String getDisplayName(int type, int level) { return "Extremely high metal content"; } case DEPLOYMENT_ZONE: - return "Deployment Zone " + level; + return "Deployment Zone"; default: return null; }