From 06ba17fb218e4437626badd554345c7c910750b4 Mon Sep 17 00:00:00 2001 From: IllianiCBT Date: Mon, 18 Nov 2024 18:15:14 -0600 Subject: [PATCH] Enhanced INVALID formation level checking Expanded the case matching for the INVALID formation level to include the string "Invalid Formation". This improves robustness in identifying invalid formation levels in the system. --- MekHQ/src/mekhq/campaign/force/FormationLevel.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MekHQ/src/mekhq/campaign/force/FormationLevel.java b/MekHQ/src/mekhq/campaign/force/FormationLevel.java index 3f4262d3ac..6b556ea331 100644 --- a/MekHQ/src/mekhq/campaign/force/FormationLevel.java +++ b/MekHQ/src/mekhq/campaign/force/FormationLevel.java @@ -18,12 +18,12 @@ */ package mekhq.campaign.force; -import java.util.ResourceBundle; - import mekhq.MekHQ; import mekhq.campaign.Campaign; import mekhq.campaign.universe.Faction; +import java.util.ResourceBundle; + public enum FormationLevel { // region Enum Declarations REMOVE_OVERRIDE("FormationLevel.REMOVE_OVERRIDE.text", "FormationLevel.REMOVE_OVERRIDE.description", -1, true, true, @@ -218,7 +218,7 @@ public static FormationLevel parseFromString(final String formationLevel) { return switch (formationLevel) { case "0", "Remove Override" -> REMOVE_OVERRIDE; case "1", "None" -> NONE; - case "2", "Invalid" -> INVALID; + case "2", "Invalid", "Invalid Formation" -> INVALID; // Inner Sphere case "3", "Lance" -> LANCE;