Skip to content

Commit

Permalink
Enhanced INVALID formation level checking
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
IllianiCBT committed Nov 19, 2024
1 parent 3979544 commit 06ba17f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MekHQ/src/mekhq/campaign/force/FormationLevel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 06ba17f

Please sign in to comment.