Skip to content

Commit

Permalink
chore: gm improving gm commands, removing unnecessary options
Browse files Browse the repository at this point in the history
  • Loading branch information
Scoppio committed Nov 15, 2024
1 parent 300dc96 commit 4d3ecda
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
2 changes: 0 additions & 2 deletions megamek/i18n/megamek/common/options/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ GameOptionsInfo.option.allow_nukes.displayableName=Allow command-line nukes.
GameOptionsInfo.option.allow_nukes.description=This must be checked to allow players to throw nukes from the command line. If this is not checked, nukes are still available as advanced munitions.
GameOptionsInfo.option.really_allow_nukes.displayableName=REALLY allow command-line nukes.
GameOptionsInfo.option.really_allow_nukes.description=This must be checked to allow players to throw nukes from the command line. If this is not checked, nukes are still available as advanced munitions.
GameOptionsInfo.option.gm_can_kill_units.displayableName=Allow command-line kill (GM only).
GameOptionsInfo.option.gm_can_kill_units.description=This must be checked to allow the GM to kill units using command line. If this is not checked, the command is disabled.


GameOptionsInfo.group.advancedRules.displayableName=Advanced Rules
Expand Down
1 change: 0 additions & 1 deletion megamek/src/megamek/common/options/GameOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public synchronized void initialize() {
addOption(allowed, OptionsConstants.ALLOWED_NO_CLAN_PHYSICAL, false);
addOption(allowed, OptionsConstants.ALLOWED_ALLOW_NUKES, false);
addOption(allowed, OptionsConstants.ALLOWED_REALLY_ALLOW_NUKES, false);
addOption(allowed, OptionsConstants.ALLOWED_GM_CAN_KILL_UNITS, false);

IBasicOptionGroup advancedRules = addGroup("advancedRules");
addOption(advancedRules, OptionsConstants.ADVANCED_MINEFIELDS, false);
Expand Down
1 change: 0 additions & 1 deletion megamek/src/megamek/common/options/OptionsConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ public class OptionsConstants {
public static final String ALLOWED_NO_CLAN_PHYSICAL = "no_clan_physical";
public static final String ALLOWED_ALLOW_NUKES = "allow_nukes";
public static final String ALLOWED_REALLY_ALLOW_NUKES = "really_allow_nukes";
public static final String ALLOWED_GM_CAN_KILL_UNITS = "gm_can_kill_units";
public static final String ADVANCED_MINEFIELDS = "minefields";
public static final String ADVANCED_HIDDEN_UNITS = "hidden_units";
public static final String ADVANCED_BLACK_ICE= "black_ice";
Expand Down
4 changes: 0 additions & 4 deletions megamek/src/megamek/server/commands/KillCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ public KillCommand(Server server, TWGameManager gameManager) {
public void run(int connId, String[] args) {

// Check to make sure gm kills are allowed!
if (!(server.getGame().getOptions().booleanOption(OptionsConstants.ALLOWED_GM_CAN_KILL_UNITS))) {
server.sendServerChat(connId, "Command-line kill is not enabled in this game.");
return;
}
if (!isGM(connId)) {
server.sendServerChat(connId, "You are not a Game Master.");
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public OrbitalBombardmentCommand(Server server, TWGameManager gameManager) {
super(server, "ob", "GM Drops a bomb onto the board doing of 100 damage with a 3 hex radius, to be exploded at" +
"the end of the next weapons attack phase." +
"Allowed formats:"+
"/bomb <x> <y> and" +
"/bomb <x> <y> [factor=10] [radius=4]" +
"the damage at impact point is 10 times the factor, default is 10. " +
"/ob <x> <y> and" +
"/ob <x> <y> [factor=#] [radius=#]" +
"the damage at impact point is the factor times 10, default factor value is 10. " +
"and hex x, y is x=column number and y=row number (hex 0923 would be x=9 and y=23), the explosion blast radius default " +
"is equal to 4, it automatically applies a linear damage dropoff each hex away from the center." +
" All parameters in square brackets may be ommited. " +
" All parameters in square brackets may be omitted. " +
" Example: /ob 10 10 factor=12 ");
this.gameManager = gameManager;
}
Expand Down

0 comments on commit 4d3ecda

Please sign in to comment.