Skip to content

Commit

Permalink
Merge pull request #6245 from Scoppio/even-more-gm-tools
Browse files Browse the repository at this point in the history
feat: add new chat commands, updates a bit the commands gui, give nukes to GMs
  • Loading branch information
HammerGS authored Dec 15, 2024
2 parents d1e72c6 + b224fc2 commit 159c478
Show file tree
Hide file tree
Showing 51 changed files with 2,243 additions and 620 deletions.
48 changes: 44 additions & 4 deletions megamek/i18n/megamek/client/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4675,14 +4675,18 @@ Gamemaster.KillUnit=Kill Unit
Gamemaster.KillUnit.text=Kill Unit {0}
Gamemaster.KillUnit.confirmation=Are you sure you want to kill {0}?
Gamemaster.SpecialCommands=Special Actions

#Gamemaster Chat Commands
Gamemaster.cmd.missingUnit=Specified unit is not on the board.
Gamemaster.cmd.error.integerparse=must be between the min and max values:
Gamemaster.cmd.error.outofbounds=Specified hex is not on the board.
Gamemaster.cmd.help=Usage:
Gamemaster.cmd.params.required=Required.
Gamemaster.cmd.params.optional=Optional.
Gamemaster.cmd.x=The x coordinate of the hex.
Gamemaster.cmd.y=The y coordinate of the hex.
Gamemaster.cmd.playerID=The ID of the player that is going to be held as responsible.

# Rescue cmd
Gamemaster.cmd.rescue.longName=Rescue Unit
Gamemaster.cmd.rescue.unitID=ID of the unit to rescue.
Expand Down Expand Up @@ -4721,7 +4725,7 @@ Gamemaster.cmd.changeweather.blowsand=Blowing Sand
Gamemaster.cmd.changeweather.emi=EMI
Gamemaster.cmd.changeweather.weather=Weather
# Disaster cmd
Gamemaster.cmd.disaster.longName=Disaster
Gamemaster.cmd.disaster.longName=Disaster!
Gamemaster.cmd.disaster.help=Causes a disaster on the board.
Gamemaster.cmd.disaster.type=Type of disaster. Beware, some disasters are very destructive!
Gamemaster.cmd.changeweather.fog.success=The fog has changed.
Expand All @@ -4740,7 +4744,7 @@ Gamemaster.cmd.firestarter.longName=Start a Fire
Gamemaster.cmd.fire.type=Type of fire. They are 1=Normal, 2=Inferno, 3=Inferno Bomb or 4=Inferno IV.
Gamemaster.cmd.fire.help=Starts a fire on the board.
# Firestorm cmd
Gamemaster.cmd.firestorm.longName=Firestorm
Gamemaster.cmd.firestorm.longName=Start a Firestorm
Gamemaster.cmd.firestorm.help=Starts fire in the entire board.
Gamemaster.cmd.fire.failed=Failed to ignite fire.
Gamemaster.cmd.fire.percent=Percentage of the board hexes to ignite.
Expand All @@ -4751,14 +4755,50 @@ Gamemaster.cmd.orbitalbombardment.dmg=Total damage at target hex.
Gamemaster.cmd.orbitalbombardment.radius=Radius of the bombardment.
Gamemaster.cmd.orbitalbombardment.error.outofbounds=Specified hex is not on the board.
Gamemaster.cmd.orbitalbombardment.success=Orbital bombardment incoming!

#Nuclear strike
Gamemaster.cmd.nuke.longName=Nuclear Strike
Gamemaster.cmd.nuke.help=Calls a Nuclear Strike onto the board, to be exploded at the end of the next weapons attack phase.
Gamemaster.cmd.nuke.type=The type of nuke to drop.
Gamemaster.cmd.nuke.error.disabled=Command-line nukes are not enabled in this game.

Gamemaster.cmd.nuke.success=A nuke is incoming! Take cover!

#Nuclear strike custom
Gamemaster.cmd.nukec.longName=Nuclear Strike (Custom)
Gamemaster.cmd.nukec.help=Calls a Nuclear Strike onto the board with a custom bomb, to be exploded at the end of the next weapons attack phase.
Gamemaster.cmd.nukec.dmg=Total damage at target hex.
Gamemaster.cmd.nukec.radius=Radius of the secondary explosion of the nuclear strike.
Gamemaster.cmd.nukec.deg=Degradation of the nuclear strike.
Gamemaster.cmd.nukec.depth=Crater depth of the nuclear strike.

# Firefight
Gamemaster.cmd.firefight.longName=Firefight
Gamemaster.cmd.firefight.longName=Extinguish a Fire
Gamemaster.cmd.firefight.reason=Fire extinguished
Gamemaster.cmd.firefight.help=Extinguishes a fire on the board.

# No Fire
Gamemaster.cmd.nofire.longName=No Fires
Gamemaster.cmd.nofire.longName=Extinguish All Fires
Gamemaster.cmd.nofire.help=Extinguishes all fires on the board.

# Change player team
Gamemaster.cmd.changeteam.help=Changes the team of a player.
Gamemaster.cmd.changeteam.longName=Change Player Team
Gamemaster.cmd.changeteam.playerNotFound=No such player.
Gamemaster.cmd.changeteam.success=Player {0} has been moved to team {1}.
Gamemaster.cmd.changeteam.playerID=ID of the player to change team.
Gamemaster.cmd.changeteam.teamID=ID of the team to move the player to.
Gamemaster.cmd.changeteam.playerCantJoinUnassigned=Player must have no more units to join the unassigned team!

# End game
Gamemaster.cmd.endgame.success=This is the end of the game
Gamemaster.cmd.endgame.force=Force the game to finish before the end of the round
Gamemaster.cmd.endgame.help=Ends the game, declaring one player the winner. If the player is part of a team then their team wins.
Gamemaster.cmd.endgame.playerID=ID of the player to win the game, or whose team is to be declared winner.
Gamemaster.cmd.endgame.longName=End Game
Gamemaster.cmd.endgame.playerNotFound=No such player.


# Orbital Bombardment text
OrbitalBombardment.source=Unknown warship in orbit
OrbitalBombardment.hitOnRound=Orbital bombardment incoming, hit on round {0}
Expand Down
4 changes: 2 additions & 2 deletions megamek/src/megamek/client/ui/swing/MapMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import megamek.client.bot.princess.CardinalEdge;
import megamek.client.event.BoardViewEvent;
import megamek.client.ui.Messages;
import megamek.client.ui.swing.gmCommands.GamemasterCommandPanel;
import megamek.client.ui.swing.commands.ClientCommandPanel;
import megamek.client.ui.swing.lobby.LobbyUtility;
import megamek.common.*;
import megamek.common.Building.DemolitionCharge;
Expand Down Expand Up @@ -693,7 +693,7 @@ private JMenu createGMSpecialCommandsMenu() {
new RescueCommand(null, null)
).forEach(cmd -> {
JMenuItem item = new JMenuItem(cmd.getLongName());
item.addActionListener(evt -> new GamemasterCommandPanel(gui.getFrame(), gui, cmd, coords).setVisible(true));
item.addActionListener(evt -> new ClientCommandPanel(gui.getFrame(), gui, cmd, coords).setVisible(true));
menu.add(item);
});

Expand Down
Loading

0 comments on commit 159c478

Please sign in to comment.