Skip to content

Commit

Permalink
Merge pull request #4821 from IllianiCBT/toeReader_armyGroup
Browse files Browse the repository at this point in the history
Added Army Group Formation Level
  • Loading branch information
IllianiCBT authored Sep 13, 2024
2 parents b5d7044 + 7bcbbe4 commit fa24973
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 31 deletions.
2 changes: 2 additions & 0 deletions MekHQ/resources/mekhq/resources/FormationLevel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ FormationLevel.CORPS.text=Corps
FormationLevel.CORPS.description=A corps is composed of three divisions. It represents a major strategic unit, capable of coordinating large-scale operations and multiple battlegrounds.
FormationLevel.ARMY.text=Army
FormationLevel.ARMY.description=An army consists of three corps. It is a massive formation designed for extensive strategic campaigns and major operations across multiple theaters.
FormationLevel.ARMY_GROUP.text=Army Group
FormationLevel.ARMY_GROUP.description=an Army Group is the largest military formation, typically consisting of multiple armies. This formation is massive and only used during large-scale multi-planetary operations

## Clan
FormationLevel.STAR_OR_NOVA.text=Star or Nova
Expand Down
67 changes: 36 additions & 31 deletions MekHQ/src/mekhq/campaign/force/FormationLevel.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public enum FormationLevel {
DIVISION("FormationLevel.DIVISION.text", "FormationLevel.DIVISION.description", 5, true, false, false),
CORPS("FormationLevel.CORPS.text", "FormationLevel.CORPS.description", 6, true, false, false),
ARMY("FormationLevel.ARMY.text", "FormationLevel.ARMY.description", 7, true, false, false),
ARMY_GROUP("FormationLevel.ARMY_GROUP.text", "FormationLevel.ARMY_GROUP.description", 8, true, false, false),

// Clan
STAR_OR_NOVA("FormationLevel.STAR_OR_NOVA.text", "FormationLevel.STAR_OR_NOVA.description", 0, false, true, false),
Expand Down Expand Up @@ -228,20 +229,21 @@ public static FormationLevel parseFromString(final String formationLevel) {
case "8", "Division" -> DIVISION;
case "9", "Corps" -> CORPS;
case "10", "Army" -> ARMY;
case "11", "Army Group" -> ARMY_GROUP;

// Clan
case "11", "Star or Nova" -> STAR_OR_NOVA;
case "12", "Binary or Trinary" -> BINARY_OR_TRINARY;
case "13", "Cluster" -> CLUSTER;
case "14", "Galaxy" -> GALAXY;
case "15", "Touman" -> TOUMAN;
case "12", "Star or Nova" -> STAR_OR_NOVA;
case "13", "Binary or Trinary" -> BINARY_OR_TRINARY;
case "14", "Cluster" -> CLUSTER;
case "15", "Galaxy" -> GALAXY;
case "16", "Touman" -> TOUMAN;

// ComStar
case "16", "Level II or Choir" -> LEVEL_II_OR_CHOIR;
case "17", "Level III" -> LEVEL_III;
case "18", "Level IV" -> LEVEL_IV;
case "19", "Level V" -> LEVEL_V;
case "20", "Level VI" -> LEVEL_VI;
case "17", "Level II or Choir" -> LEVEL_II_OR_CHOIR;
case "18", "Level III" -> LEVEL_III;
case "19", "Level IV" -> LEVEL_IV;
case "20", "Level V" -> LEVEL_V;
case "21", "Level VI" -> LEVEL_VI;

default ->
throw new IllegalStateException(
Expand Down Expand Up @@ -276,20 +278,21 @@ public static FormationLevel parseFromInt(final int formationLevel) {
case 8 -> DIVISION;
case 9 -> CORPS;
case 10 -> ARMY;
case 11 -> ARMY_GROUP;

// Clan
case 11 -> STAR_OR_NOVA;
case 12 -> BINARY_OR_TRINARY;
case 13 -> CLUSTER;
case 14 -> GALAXY;
case 15 -> TOUMAN;
case 12 -> STAR_OR_NOVA;
case 13 -> BINARY_OR_TRINARY;
case 14 -> CLUSTER;
case 15 -> GALAXY;
case 16 -> TOUMAN;

// ComStar
case 16 -> LEVEL_II_OR_CHOIR;
case 17 -> LEVEL_III;
case 18 -> LEVEL_IV;
case 19 -> LEVEL_V;
case 20 -> LEVEL_VI;
case 17 -> LEVEL_II_OR_CHOIR;
case 18 -> LEVEL_III;
case 19 -> LEVEL_IV;
case 20 -> LEVEL_V;
case 21 -> LEVEL_VI;

default ->
throw new IllegalStateException(
Expand Down Expand Up @@ -320,20 +323,21 @@ public int parseToInt() {
case DIVISION -> 8;
case CORPS -> 9;
case ARMY -> 10;
case ARMY_GROUP -> 11;

// Clan
case STAR_OR_NOVA -> 11;
case BINARY_OR_TRINARY -> 12;
case CLUSTER -> 13;
case GALAXY -> 14;
case TOUMAN -> 15;
case STAR_OR_NOVA -> 12;
case BINARY_OR_TRINARY -> 13;
case CLUSTER -> 14;
case GALAXY -> 15;
case TOUMAN -> 16;

// ComStar
case LEVEL_II_OR_CHOIR -> 16;
case LEVEL_III -> 17;
case LEVEL_IV -> 18;
case LEVEL_V -> 19;
case LEVEL_VI -> 20;
case LEVEL_II_OR_CHOIR -> 17;
case LEVEL_III -> 18;
case LEVEL_IV -> 19;
case LEVEL_V -> 20;
case LEVEL_VI -> 21;
};
}

Expand Down Expand Up @@ -372,7 +376,8 @@ public static FormationLevel parseFromDepth(Campaign campaign, int depth) {
case 4 -> BRIGADE;
case 5 -> DIVISION;
case 6 -> CORPS;
default -> ARMY;
case 7 -> ARMY;
default -> ARMY_GROUP;
};
}
}
Expand Down

0 comments on commit fa24973

Please sign in to comment.