diff --git a/megamek/src/megamek/common/Player.java b/megamek/src/megamek/common/Player.java index 0ebc0e2abb..acfd02920c 100644 --- a/megamek/src/megamek/common/Player.java +++ b/megamek/src/megamek/common/Player.java @@ -46,7 +46,6 @@ public final class Player extends TurnOrdered { public static final int TEAM_NONE = 0; public static final int TEAM_UNASSIGNED = -1; public static final String[] TEAM_NAMES = {"No Team", "Team 1", "Team 2", "Team 3", "Team 4", "Team 5"}; - private transient IGame game; private String name; @@ -652,6 +651,11 @@ public String getColorForPlayer() { return "" + getName() + ""; } + public String getColoredPlayerNameWithTeam() { + return "" + getName() + + " (" + TEAM_NAMES[team] + ")"; + } + /** * Clears any data from this Player that should not be transmitted to other players from the server, * such as email addresses. Note that this changes this Player's data permanently and should typically diff --git a/megamek/src/megamek/server/totalwarfare/TWGameManager.java b/megamek/src/megamek/server/totalwarfare/TWGameManager.java index 87a0301b43..c46e45a5d3 100644 --- a/megamek/src/megamek/server/totalwarfare/TWGameManager.java +++ b/megamek/src/megamek/server/totalwarfare/TWGameManager.java @@ -1579,7 +1579,7 @@ void bvReports(boolean checkBlind) { bvcPlayer.ejectedCrewKilledCount = ServerReportsHelper.getEjectedCrewKilledCount(player, game); bvcPlayer.ejectedCrewFledCount = ServerReportsHelper.getFledEjectedCrew(player, game); - playerReport.addAll(bvReport(player.getColorForPlayer(), player.getId(), bvcPlayer, checkBlind)); + playerReport.addAll(bvReport(player.getColoredPlayerNameWithTeam(), player.getId(), bvcPlayer, checkBlind)); int playerTeam = player.getTeam(); @@ -1611,7 +1611,8 @@ void bvReports(boolean checkBlind) { if (!(checkBlind && doBlind() && suppressBlindBV())) { for (Map.Entry e : teamsInfo.entrySet()) { BVCountHelper bvc = e.getValue(); - teamReport.addAll(bvReport(Player.TEAM_NAMES[e.getKey()], Player.PLAYER_NONE, bvc, false)); + var coloredTeamName = ""+ Player.TEAM_NAMES[e.getKey()] + ""; + teamReport.addAll(bvReport(coloredTeamName, Player.PLAYER_NONE, bvc, false)); } }