From ddb1cf7a46bb8aa80ee23be2804ec81c654df260 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 8 Jan 2023 12:43:29 +0100 Subject: [PATCH] Aftermerge corrections --- megamek/src/megamek/client/ui/swing/MiniReportDisplay.java | 6 +++++- megamek/src/megamek/common/Game.java | 4 ---- megamek/src/megamek/common/Mech.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/megamek/src/megamek/client/ui/swing/MiniReportDisplay.java b/megamek/src/megamek/client/ui/swing/MiniReportDisplay.java index eeed62cf150..ee068e29656 100644 --- a/megamek/src/megamek/client/ui/swing/MiniReportDisplay.java +++ b/megamek/src/megamek/client/ui/swing/MiniReportDisplay.java @@ -34,7 +34,9 @@ import javax.swing.text.Document; import java.awt.*; import java.awt.event.*; +import java.util.Comparator; import java.util.Iterator; +import java.util.List; /** * Shows reports, with an Okay JButton @@ -192,7 +194,9 @@ private void updatePlayerChoice() { lastChoice = (lastChoice != null ? lastChoice : name); comboPlayer.removeAllItems(); comboPlayer.setEnabled(true); - for (Player player : currentClient.getGame().getPlayersVectorSorted()) { + List sortedPlayerList = currentClient.getGame().getPlayersList(); + sortedPlayerList.sort(Comparator.comparingInt(Player::getId)); + for (Player player : sortedPlayerList) { String playerDisplay = String.format("%-12s", player.getName()); comboPlayer.addItem(playerDisplay); } diff --git a/megamek/src/megamek/common/Game.java b/megamek/src/megamek/common/Game.java index 6c528ecee4e..52ed4638ffe 100644 --- a/megamek/src/megamek/common/Game.java +++ b/megamek/src/megamek/common/Game.java @@ -58,10 +58,6 @@ public class Game extends AbstractGame implements Serializable { */ public final Version version = MMConstants.VERSION; - private Vector players = new Vector<>(); - private Hashtable playerIds = new Hashtable<>(); - private Vector teams = new Vector<>(); - private GameOptions options = new GameOptions(); private Board board = new Board(); diff --git a/megamek/src/megamek/common/Mech.java b/megamek/src/megamek/common/Mech.java index c9cee154207..2b26ca2d838 100644 --- a/megamek/src/megamek/common/Mech.java +++ b/megamek/src/megamek/common/Mech.java @@ -6549,4 +6549,4 @@ public boolean isIndustrialMek() { public boolean getsAutoExternalSearchlight() { return true; } -} +} \ No newline at end of file