diff --git a/megamek/src/megamek/common/Compute.java b/megamek/src/megamek/common/Compute.java index cf6aa33ebf..253fecc3d4 100644 --- a/megamek/src/megamek/common/Compute.java +++ b/megamek/src/megamek/common/Compute.java @@ -2443,7 +2443,7 @@ public static ToHitData getSecondaryTargetMod(Game game, Entity attacker, if (attacker.getCrew().hasDedicatedGunner()) { maxPrimary = attacker.getCrew().getCrewType().getMaxPrimaryTargets(); } - if (game.getOptions().booleanOption("tacops_tank_crews") + if (game.getOptions().booleanOption(OptionsConstants.ADVANCED_TACOPS_TANK_CREWS) && (attacker instanceof Tank)) { // If we are a tank, and only have 1 crew then we have some special diff --git a/megamek/src/megamek/common/FighterSquadron.java b/megamek/src/megamek/common/FighterSquadron.java index a975daf652..28e0571b12 100644 --- a/megamek/src/megamek/common/FighterSquadron.java +++ b/megamek/src/megamek/common/FighterSquadron.java @@ -529,7 +529,7 @@ public void computeSquadronBombLoadout() { } // Now that we know our bomb choices, load 'em - int gameTL = TechConstants.getSimpleLevel(game.getOptions().stringOption("techlevel")); + int gameTL = TechConstants.getSimpleLevel(game.getOptions().stringOption(OptionsConstants.ALLOWED_TECHLEVEL)); for (int type = 0; type < BombType.B_NUM; type++) { for (int i = 0; i < extBombChoices[type]; i++) { if ((type == BombType.B_ALAMO) diff --git a/megamek/src/megamek/common/IBomber.java b/megamek/src/megamek/common/IBomber.java index faee94b890..ebad0334ec 100644 --- a/megamek/src/megamek/common/IBomber.java +++ b/megamek/src/megamek/common/IBomber.java @@ -208,7 +208,7 @@ default int getBombPoints(boolean externalOnly) { */ default void applyBombs() { Game game = ((Entity) this).getGame(); - int gameTL = TechConstants.getSimpleLevel(game.getOptions().stringOption("techlevel")); + int gameTL = TechConstants.getSimpleLevel(game.getOptions().stringOption(OptionsConstants.ALLOWED_TECHLEVEL)); Integer[] iSorted = new Integer[BombType.B_NUM]; // Apply the largest bombs first because we need to fit larger bombs into a single location // in LAMs. diff --git a/megamek/src/megamek/common/TechConstants.java b/megamek/src/megamek/common/TechConstants.java index 9635167334..7dd77db641 100644 --- a/megamek/src/megamek/common/TechConstants.java +++ b/megamek/src/megamek/common/TechConstants.java @@ -15,6 +15,8 @@ */ package megamek.common; +import megamek.common.options.OptionsConstants; + /** * Contains some constants representing equipment/unit tech levels * @@ -166,7 +168,7 @@ public static int getTechLevel(String techLevel) { * @return the Game's tech level as an integer. */ public static int getSimpleLevel(Game game) { - return getSimpleLevel(game.getOptions().stringOption("techlevel")); + return getSimpleLevel(game.getOptions().stringOption(OptionsConstants.ALLOWED_TECHLEVEL)); } /** diff --git a/megamek/src/megamek/common/weapons/ArtilleryBayWeaponIndirectHomingHandler.java b/megamek/src/megamek/common/weapons/ArtilleryBayWeaponIndirectHomingHandler.java index 09154199ec..b28f266f9e 100644 --- a/megamek/src/megamek/common/weapons/ArtilleryBayWeaponIndirectHomingHandler.java +++ b/megamek/src/megamek/common/weapons/ArtilleryBayWeaponIndirectHomingHandler.java @@ -162,7 +162,7 @@ public boolean handle(GamePhase phase, Vector vPhaseReport) { // Set Margin of Success/Failure. toHit.setMoS(roll.getIntValue() - Math.max(2, toHit.getValue())); - bDirect = game.getOptions().booleanOption("tacops_direct_blow") + bDirect = game.getOptions().booleanOption(OptionsConstants.ADVCOMBAT_TACOPS_DIRECT_BLOW) && ((toHit.getMoS() / 3) >= 1) && (entityTarget != null); if (bDirect) { r = new Report(3189);