Skip to content

Commit

Permalink
clean up and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
DM0000 committed Nov 2, 2024
1 parent 63abcb5 commit 1a948e6
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 39 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 @@ -549,8 +549,6 @@ GameOptionsInfo.option.toughness.displayableName=(Unofficial) Toughness Bonus
GameOptionsInfo.option.toughness.description=Each pilot can have a toughness bonus that reduces the target for consciousness checks.
GameOptionsInfo.option.conditional_ejection.displayableName=(Unofficial) Conditional Autoejection
GameOptionsInfo.option.conditional_ejection.description=Only fire the ejection system if one of the conditions is met. This way you can eject on engine explosions and head shots, but not on ammo explosions (like when you have CASE).
GameOptionsInfo.option.manual_shutdown.displayableName=(Unofficial) Manual Shutdown/Startup
GameOptionsInfo.option.manual_shutdown.description=Adds a button in the movement phase for manual shutdown/startup.
GameOptionsInfo.option.begin_shutdown.displayableName=(Unofficial) Begin Game Shutdown
GameOptionsInfo.option.begin_shutdown.description=Adds a deployment option to begin the game in a shutdown state. Requires Manual Shutdown/Startup
GameOptionsInfo.option.max_external_heat.displayableName=(Unofficial) Maximum Heat from External Heat Sources
Expand Down
2 changes: 0 additions & 2 deletions megamek/i18n/megamek/common/options/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,6 @@ GameOptionsInfo.option.toughness.displayableName=(No oficial) Bono dureza
GameOptionsInfo.option.toughness.description=Cada piloto puede tener una bonificacion de dureza que reduce el objetivo de las pruebas de conciencia.
GameOptionsInfo.option.conditional_ejection.displayableName=(No oficial) Autoeyeccion condicional
GameOptionsInfo.option.conditional_ejection.description=Solo dispare el sistema de expulsion si se cumple una de las condiciones. De esta manera, puede ejectar en explosion de motor y disparos a la cabeza, pero no explosiones de municion (como cuando tiene CASE).
GameOptionsInfo.option.manual_shutdown.displayableName=(No oficial) Apagado/inicio manual
GameOptionsInfo.option.manual_shutdown.description=Agrega un boton en la fase de movimiento para apagado/inicio manual.
GameOptionsInfo.option.begin_shutdown.displayableName=(No oficial) Comienza el cierre del juego
GameOptionsInfo.option.begin_shutdown.description=Agrega una opcion de despliegue para comenzar el juego en un estado de apagado.\nRequiere apagado/inicio manual.
GameOptionsInfo.option.max_external_heat.displayableName=(No oficial) Calor maximo de fuentes de calor externas
Expand Down
2 changes: 0 additions & 2 deletions megamek/i18n/megamek/common/options/messages_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,6 @@ GameOptionsInfo.option.toughness.displayableName=(Неофициально) Бо
GameOptionsInfo.option.toughness.description=У каждого пилота может быть бонус здоровья, который уменьшает целевое число при бросках на потерю сознания.
GameOptionsInfo.option.conditional_ejection.displayableName=(Неофициально) Условное автокатапультирование
GameOptionsInfo.option.conditional_ejection.description=Применять систему катапультирования только при определенных условиях. Например, вы можете катапультироваться при взрыве двигателя или попадании в голову, но не при подрыве боезапаса (когда у вас есть CASE).
GameOptionsInfo.option.manual_shutdown.displayableName=(Неофициально) Ручное отключение/включение
GameOptionsInfo.option.manual_shutdown.description=Добавляет кнопку в фазе движения для ручного отключения или включения.
GameOptionsInfo.option.begin_shutdown.displayableName=(Неофициально) Отключение с начала игры
GameOptionsInfo.option.begin_shutdown.description=Добавляет опция при расстановке, начинать игру отключенным.\nТребует ручного отключения/включения
GameOptionsInfo.option.max_external_heat.displayableName=(Неофициально) Максимум тепла от внешних источников
Expand Down
16 changes: 1 addition & 15 deletions megamek/src/megamek/client/ui/swing/GameOptionsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,7 @@ private void addOption(JPanel groupPanel, IOption option) {
//Set to the maximum velocity if over
option.setValue(CapitalMissileBayWeapon.CAPITAL_MISSILE_MAX_VELOCITY);
}
}
// else if (option.getName().equals(OptionsConstants.RPG_BEGIN_SHUTDOWN)) {
// if ((options.getOption(OptionsConstants.RPG_MANUAL_SHUTDOWN)).booleanValue()) {
// optionComp.setEditable(editable);
// } else {
// optionComp.setEditable(false);
// }
// }
}
else if (option.getName().equals(OptionsConstants.ADVANCED_ALTERNATE_MASC_ENHANCED)) {
if ((options.getOption(OptionsConstants.ADVANCED_ALTERNATE_MASC)).booleanValue()) {
optionComp.setEditable(editable);
Expand Down Expand Up @@ -731,13 +724,6 @@ public void optionClicked(DialogOptionComponent clickedComp, IOption option, boo
comp_i.resetToDefault();
}
}
// if (option.getName().equals(OptionsConstants.RPG_MANUAL_SHUTDOWN)) {
// comps = optionComps.get(OptionsConstants.RPG_BEGIN_SHUTDOWN);
// for (DialogOptionComponent comp_i : comps) {
// comp_i.setEditable(state);
// comp_i.setSelected(false);
// }
// }
if (option.getName().equals(OptionsConstants.ADVANCED_ALTERNATE_MASC)) {
comps = optionComps.get(OptionsConstants.ADVANCED_ALTERNATE_MASC_ENHANCED);
for (DialogOptionComponent comp_i : comps) {
Expand Down
11 changes: 0 additions & 11 deletions megamek/src/megamek/client/ui/swing/MovementDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ public static MoveCommand[] values(int f, GameOptions opts, boolean forwardIni)
boolean vtolStrafe = false;

if (opts != null) {
// manualShutdown = opts.booleanOption(OptionsConstants.RPG_MANUAL_SHUTDOWN);
selfDestruct = opts.booleanOption(OptionsConstants.ADVANCED_TACOPS_SELF_DESTRUCT);
advVehicle = opts.booleanOption(OptionsConstants.ADVGRNDMOV_VEHICLE_ADVANCED_MANEUVERS);
vtolStrafe = opts.booleanOption(OptionsConstants.ADVCOMBAT_VTOL_STRAFING);
Expand Down Expand Up @@ -2616,11 +2615,6 @@ private void updateShutdownButton() {
return;
}

// if (!clientgui.getClient().getGame().getOptions()
// .booleanOption(OptionsConstants.RPG_MANUAL_SHUTDOWN)) {
// return;
// }

if (ce instanceof Infantry) {
return;
}
Expand All @@ -2635,11 +2629,6 @@ private void updateStartupButton() {
return;
}

// if (!clientgui.getClient().getGame().getOptions()
// .booleanOption(OptionsConstants.RPG_MANUAL_SHUTDOWN)) {
// return;
// }

if (ce instanceof Infantry) {
return;
}
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 @@ -303,7 +303,6 @@ public synchronized void initialize() {
addOption(rpg, OptionsConstants.RPG_ARTILLERY_SKILL, false);
addOption(rpg, OptionsConstants.RPG_TOUGHNESS, false);
addOption(rpg, OptionsConstants.RPG_CONDITIONAL_EJECTION, false);
// addOption(rpg, OptionsConstants.RPG_MANUAL_SHUTDOWN, false);
addOption(rpg, OptionsConstants.RPG_BEGIN_SHUTDOWN, 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 @@ -526,7 +526,6 @@ public class OptionsConstants {
public static final String RPG_ARTILLERY_SKILL = "artillery_skill";
public static final String RPG_TOUGHNESS = "toughness";
public static final String RPG_CONDITIONAL_EJECTION = "conditional_ejection";
// public static final String RPG_MANUAL_SHUTDOWN = "manual_shutdown";
public static final String RPG_BEGIN_SHUTDOWN = "begin_shutdown";

private OptionsConstants() { }
Expand Down
6 changes: 1 addition & 5 deletions megamek/src/megamek/server/ServerHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,7 @@ public static void resolveAeroHeat(Game game, Entity entity, Vector<Report> vPha
int roll = Compute.d6(2);
if (roll >= 8) {
entity.setTaserShutdownRounds(0);
if (!(
// game.getOptions().booleanOption(
// OptionsConstants.RPG_MANUAL_SHUTDOWN)
// &&
entity.isManualShutdown())) {
if (!(entity.isManualShutdown())) {
entity.setShutDown(false);
}
entity.setBATaserShutdown(false);
Expand Down

0 comments on commit 1a948e6

Please sign in to comment.