Skip to content

Commit

Permalink
Merge branch 'master' into turnSounds
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronekochomusuke authored Feb 7, 2023
2 parents d85226c + 51a4f8b commit f74e770
Show file tree
Hide file tree
Showing 43 changed files with 133,867 additions and 19,424 deletions.
Binary file added megamek/data/boards/unofficial/VictorMorson.rar
Binary file not shown.
12,403 changes: 12,403 additions & 0 deletions megamek/data/boards/unofficial/VictorMorson/100x124 Asteroid Biodome.board

Large diffs are not rendered by default.

12,403 changes: 12,403 additions & 0 deletions megamek/data/boards/unofficial/VictorMorson/100x124 Asteroid Expanse.board

Large diffs are not rendered by default.

12,403 changes: 12,403 additions & 0 deletions megamek/data/boards/unofficial/VictorMorson/100x124 TC Mirfak Mudtown.board

Large diffs are not rendered by default.

30,754 changes: 30,754 additions & 0 deletions megamek/data/boards/unofficial/VictorMorson/124x248 TC Mirfak Baudrys Delight.board

Large diffs are not rendered by default.

30,754 changes: 30,754 additions & 0 deletions megamek/data/boards/unofficial/VictorMorson/124x248-TC-Mirfak-Baudrys_Delight.board

Large diffs are not rendered by default.

15,363 changes: 15,363 additions & 0 deletions megamek/data/boards/unofficial/VictorMorson/160x96 Galatea Compound.board

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

239 changes: 211 additions & 28 deletions megamek/data/canonUnitQuirks.xml

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added megamek/data/images/fluff/DropShip/Colossus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added megamek/data/images/fluff/Fighter/Lucifer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added megamek/data/images/fluff/Mech/Akuma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added megamek/data/images/fluff/Protomek/Centaur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added megamek/data/images/fluff/Small Craft/Bus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions megamek/docs/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ VERSION HISTORY:
+ PR #4101: SPA: Environmental Specialist
+ PR #4102: SPA: Terrain Master (Nightwalker)
+ PR #4142: Fix threading issues and add a SkinnedJPanel
+ PR #4123: Expanding Primary Dialog Preferences
+ Issue #4148: Infantry Fortify option takes one turn instead of three
+ Issue #4032: Filter Tactical Genius Double Blind Report Message
+ Issue #3151: Unit Display Weapon List Count Option
+ Issue #4160: Correct issue with weapon list visible row count
+ Issue #4128: Status bar update for players remaining
+ Updating XStream to 1.4.19 from 1.4.14

0.49.11 (2022-12-22 1500 UTC)
Expand Down
5 changes: 5 additions & 0 deletions megamek/i18n/megamek/client/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ AdvancedOptions.PlanetaryConditionsShowIndicators.name=Planetary Conditions Show
AdvancedOptions.UnitToolTipSeenByResolution.name=UnitToolTip - Seen By Resolution [1=Someone,2=Team,3=Player]
AdvancedOptions.DockOnLeft.name=Dock on left side of the board
AdvancedOptions.DockMultipleOnYAxis.name=Dock multiple panels using the y axis
AdvancedOptions.PlayersRemainingToShow.name=Number of Players remaining to show on the Phase Display Status Bar
AdvancedOptions.UnitDisplayWeaponListCount.name=Unit Display - Weapon list visible count

#Board Editor
BoardEditor.BridgeBuildingElevError=Bridge/Building Elevation is an offset from the surface of a hex and hence must be a positive value!
Expand Down Expand Up @@ -3181,6 +3183,9 @@ Ruler.Start=Start:
Ruler.title=Ruler
Ruler.isMech=Is Mech?

StatusBarPhaseDisplay.nextPlayerTurns=Next player turns
StatusBarPhaseDisplay.notDone=Unfinished players

#Sea Mine Depth Dialog
SeaMineDepthDialog.title=Mine Depth
SeaMineDepthDialog.labDepth=Depth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ public void windowClosing(WindowEvent evt) {
}
//endregion Constructors

public void saveSettings() {
GUIP.setMiniReportSizeWidth(getSize().width);
GUIP.setMiniReportSizeHeight(getSize().height);
GUIP.setMiniReportPosX(getLocation().x);
GUIP.setMiniReportPosY(getLocation().y);
}

@Override
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if ((e.getID() == WindowEvent.WINDOW_DEACTIVATED) || (e.getID() == WindowEvent.WINDOW_CLOSING)) {
GUIP.setMiniReportSizeWidth(getSize().width);
GUIP.setMiniReportSizeHeight(getSize().height);
GUIP.setMiniReportPosX(getLocation().x);
GUIP.setMiniReportPosY(getLocation().y);
saveSettings();
}
}

Expand Down
32 changes: 18 additions & 14 deletions megamek/src/megamek/client/ui/dialogs/UnitDisplayDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,28 @@ public void windowClosing(WindowEvent evt) {
}
//endregion Constructors

public void saveSettings() {
if ((getSize().width * getSize().height) > 0) {
if (GUIP.getUnitDisplayStartTabbed()) {
GUIP.setUnitDisplayPosX(getLocation().x);
GUIP.setUnitDisplayPosY(getLocation().y);
GUIP.setUnitDisplaySizeWidth(getSize().width);
GUIP.setUnitDisplaySizeHeight(getSize().height);
} else {
GUIP.setUnitDisplayNontabbedPosX(getLocation().x);
GUIP.setUnitDisplayNontabbedPosY(getLocation().y);
GUIP.setUnitDisplayNonTabbedSizeWidth(getSize().width);
GUIP.setUnitDisplayNonTabbedSizeHeight(getSize().height);
clientGUI.getUnitDisplay().saveSplitterLoc();
}
}
}

@Override
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if ((e.getID() == WindowEvent.WINDOW_DEACTIVATED) || (e.getID() == WindowEvent.WINDOW_CLOSING)) {
if ((getSize().width * getSize().height) > 0) {
if (GUIP.getUnitDisplayStartTabbed()) {
GUIP.setUnitDisplayPosX(getLocation().x);
GUIP.setUnitDisplayPosY(getLocation().y);
GUIP.setUnitDisplaySizeWidth(getSize().width);
GUIP.setUnitDisplaySizeHeight(getSize().height);
} else {
GUIP.setUnitDisplayNontabbedPosX(getLocation().x);
GUIP.setUnitDisplayNontabbedPosY(getLocation().y);
GUIP.setUnitDisplayNonTabbedSizeWidth(getSize().width);
GUIP.setUnitDisplayNonTabbedSizeHeight(getSize().height);
clientGUI.getUnitDisplay().saveSplitterLoc();
}
}
saveSettings();
}
}

Expand Down
108 changes: 68 additions & 40 deletions megamek/src/megamek/client/ui/swing/ClientGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,14 @@ public void setUnitDisplayDialog(final UnitDisplayDialog unitDisplayDialog) {
this.unitDisplayDialog = unitDisplayDialog;
}

public JDialog getMiniMapDialog() {
return minimapW;
}

public void setMiniMapDialog(final JDialog miniMapDialog) {
this.minimapW = miniMapDialog;
}

public MiniReportDisplay getMiniReportDisplay() {
return miniReportDisplay;
}
Expand All @@ -399,12 +407,16 @@ public MiniReportDisplayDialog getMiniReportDisplayDialog() {
return miniReportDisplayDialog;
}

public void setMiniReportDisplayDialog(final MiniReportDisplayDialog miniReportDisplayDialog) {
this.miniReportDisplayDialog = miniReportDisplayDialog;
}

public PlayerListDialog getPlayerListDialog() {
return playerListDialog;
}

public void setMiniReportDisplayDialog(final MiniReportDisplayDialog miniReportDisplayDialog) {
this.miniReportDisplayDialog = miniReportDisplayDialog;
public void setPlayerListDialog(final PlayerListDialog playerListDialog) {
this.playerListDialog = playerListDialog;
}

/**
Expand Down Expand Up @@ -588,7 +600,7 @@ public void windowClosing(WindowEvent e) {
setMiniReportDisplayDialog(new MiniReportDisplayDialog(getFrame(), this));
getMiniReportDisplayDialog().setVisible(false);

playerListDialog = new PlayerListDialog(frame, client, false);
setPlayerListDialog(new PlayerListDialog(frame, client, false));

Ruler.color1 = GUIP.getRulerColor1();
Ruler.color2 = GUIP.getRulerColor2();
Expand All @@ -597,7 +609,7 @@ public void windowClosing(WindowEvent e) {
ruler.setSize(GUIP.getRulerSizeHeight(), GUIP.getRulerSizeWidth());
UIUtil.updateWindowBounds(ruler);

minimapW = Minimap.createMinimap(frame, getBoardView(), getClient().getGame(), this);
setMiniMapDialog(Minimap.createMinimap(frame, getBoardView(), getClient().getGame(), this));
cb = new ChatterBox(this);
cb.setChatterBox2(cb2);
cb2.setChatterBox(cb);
Expand Down Expand Up @@ -701,16 +713,16 @@ public void customizePlayer() {
* Called when the user selects the "View->Player List" menu item.
*/
public void showPlayerList() {
if (playerListDialog == null) {
playerListDialog = new PlayerListDialog(frame, client, false);
if (getPlayerListDialog() == null) {
setPlayerListDialog(new PlayerListDialog(frame, client, false));
}
playerListDialog.setVisible(true);
getPlayerListDialog().setVisible(true);
}

public void miniReportDisplayAddReportPages() {
ignoreHotKeys = true;
if (miniReportDisplay != null) {
miniReportDisplay.addReportPages();
if (getMiniReportDisplay() != null) {
getMiniReportDisplay().addReportPages();
}
ignoreHotKeys = false;
}
Expand All @@ -729,18 +741,34 @@ public void reportDisplayResetRerollInitiative() {
}
}

private boolean resetMiniMapZoom(Container c) {
for (Component comp : c.getComponents()) {
if (comp instanceof Minimap) {
Minimap mm = (Minimap) comp;
mm.resetZoom();
return true;
} else {
if (resetMiniMapZoom((Container) comp)) {
return true;
}
}
}
return false;
}

public void resetWindowPositions() {
if (minimapW != null) {
minimapW.setBounds(0, 0, minimapW.getWidth(), minimapW.getHeight());
if (getMiniMapDialog() != null) {
getMiniMapDialog().setBounds(0, 0, getMiniMapDialog().getWidth(), getMiniMapDialog().getHeight());
resetMiniMapZoom(getMiniMapDialog());
}
if (getUnitDisplayDialog() != null) {
getUnitDisplayDialog().setBounds(0, 0, getUnitDisplay().getWidth(), getUnitDisplay().getHeight());
}
if (miniReportDisplayDialog!= null) {
miniReportDisplayDialog.setBounds(0, 0, miniReportDisplayDialog.getWidth(), miniReportDisplayDialog.getHeight());
if (getMiniReportDisplayDialog() != null) {
getMiniReportDisplayDialog().setBounds(0, 0, getMiniReportDisplayDialog().getWidth(), getMiniReportDisplayDialog().getHeight());
}
if (playerListDialog != null) {
playerListDialog.setBounds(0, 0, playerListDialog.getWidth(), playerListDialog.getHeight());
if (getPlayerListDialog() != null) {
getPlayerListDialog().setBounds(0, 0, getPlayerListDialog().getWidth(), getPlayerListDialog().getHeight());
}
if (gameOptionsDialog!= null) {
gameOptionsDialog.setBounds(0, 0, gameOptionsDialog.getWidth(), gameOptionsDialog.getHeight());
Expand Down Expand Up @@ -1016,32 +1044,28 @@ void saveSettings() {
GUIP.setWindowSizeWidth(frame.getSize().width);
GUIP.setWindowSizeHeight(frame.getSize().height);

// Minimap
if ((minimapW != null) && ((minimapW.getSize().width * minimapW.getSize().height) > 0)) {
GUIP.setMinimapPosX(minimapW.getLocation().x);
GUIP.setMinimapPosY(minimapW.getLocation().y);
// Minimap Dialog
if ((getMiniMapDialog() != null) && ((getMiniMapDialog().getSize().width * getMiniMapDialog().getSize().height) > 0)) {
GUIP.setMinimapPosX(getMiniMapDialog().getLocation().x);
GUIP.setMinimapPosY(getMiniMapDialog().getLocation().y);
}

// Mek display
if ((getUnitDisplayDialog() != null)
&& ((getUnitDisplayDialog().getSize().width * getUnitDisplayDialog().getSize().height) > 0)) {
if (GUIP.getUnitDisplayStartTabbed()) {
GUIP.setUnitDisplayPosX(getUnitDisplayDialog().getLocation().x);
GUIP.setUnitDisplayPosY(getUnitDisplayDialog().getLocation().y);
GUIP.setUnitDisplaySizeWidth(getUnitDisplayDialog().getSize().width);
GUIP.setUnitDisplaySizeHeight(getUnitDisplayDialog().getSize().height);
}
else {
GUIP.setUnitDisplayNontabbedPosX(getUnitDisplayDialog().getLocation().x);
GUIP.setUnitDisplayNontabbedPosY(getUnitDisplayDialog().getLocation().y);
GUIP.setUnitDisplayNonTabbedSizeWidth(getUnitDisplayDialog().getSize().width);
GUIP.setUnitDisplayNonTabbedSizeHeight(getUnitDisplayDialog().getSize().height);
unitDisplay.saveSplitterLoc();
}

// Unit Display Dialog
if (getUnitDisplayDialog() != null) {
getUnitDisplayDialog().saveSettings();
saveSplitPaneLocations();
}

// Mini Report Dialog
if (getMiniReportDisplayDialog() != null) {
getMiniReportDisplayDialog().saveSettings();
}

// Player List Dialog
if (getPlayerListDialog() != null) {
getPlayerListDialog().saveSettings();
}

// Ruler display
if ((ruler != null) && (ruler.getSize().width != 0) && (ruler.getSize().height != 0)) {
GUIP.setRulerPosX(ruler.getLocation().x);
Expand Down Expand Up @@ -1515,8 +1539,8 @@ private void maybeShowPlayerList() {
* Does not change the menu setting.
*/
void setMapVisible(boolean visible) {
if (minimapW != null) {
minimapW.setVisible(visible);
if (getMiniMapDialog() != null) {
getMiniMapDialog().setVisible(visible);
}
}

Expand All @@ -1530,8 +1554,8 @@ void setPlayerListVisible(boolean visible) {
if (visible) {
showPlayerList();
} else {
if (playerListDialog != null) {
playerListDialog.setVisible(visible);
if (getPlayerListDialog() != null) {
getPlayerListDialog().setVisible(visible);
}
}
}
Expand Down Expand Up @@ -2158,6 +2182,10 @@ private void setWeaponOrderPrefs(boolean prefChange) {
public void gamePlayerChange(GamePlayerChangeEvent evt) {
if (playerListDialog != null) {
playerListDialog.refreshPlayerList();

if (currPhaseDisplay != null) {
currPhaseDisplay.setStatusBarWithNotDonePlayers();
}
}
}

Expand Down
8 changes: 6 additions & 2 deletions megamek/src/megamek/client/ui/swing/DeploymentDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,22 +401,26 @@ public void gameTurnChange(GameTurnChangeEvent e) {
// ignore
return;
}

String s = getRemainingPlayerWithTurns();

if (clientgui.getClient().isMyTurn()) {
if (cen == Entity.NONE) {
beginMyTurn();
clientgui.bingMyTurn();
}
setStatusBarText(Messages.getString("DeploymentDisplay.its_your_turn"));
setStatusBarText(Messages.getString("DeploymentDisplay.its_your_turn") + s);
} else {
endMyTurn();
String playerName;

if (e.getPlayer() != null) {
playerName = e.getPlayer().getName();
} else {
playerName = "Unknown";
}
setStatusBarText(Messages.getString("DeploymentDisplay.its_others_turn", playerName));

setStatusBarText(Messages.getString("DeploymentDisplay.its_others_turn", playerName) + s);
clientgui.bingOthersTurn();
}

Expand Down
8 changes: 6 additions & 2 deletions megamek/src/megamek/client/ui/swing/FiringDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -2187,21 +2187,25 @@ public void gameTurnChange(GameTurnChangeEvent e) {
}

if (clientgui.getClient().getGame().getPhase().isFiring()) {
String s = getRemainingPlayerWithTurns();
if (clientgui.getClient().isMyTurn()) {
if (cen == Entity.NONE) {
beginMyTurn();
}
setStatusBarText(Messages.getString("FiringDisplay.its_your_turn"));

setStatusBarText(Messages.getString("FiringDisplay.its_your_turn") + s);
clientgui.bingMyTurn();
} else {
endMyTurn();
String playerName;

if (e.getPlayer() != null) {
playerName = e.getPlayer().getName();
} else {
playerName = "Unknown";
}
setStatusBarText(Messages.getString("FiringDisplay.its_others_turn", playerName));

setStatusBarText(Messages.getString("FiringDisplay.its_others_turn", playerName) + s);
clientgui.bingOthersTurn();
}
}
Expand Down
Loading

0 comments on commit f74e770

Please sign in to comment.