diff --git a/changelog.md b/changelog.md index 03da1769..d6e3586b 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ Saves from 7.x are not compatible with 8.0. * **[Factions]** Replaced Patriot STRs "EWRs" with AN/FPS-117 for blue factions 1980 or newer. * **[Mission Generation]** Added option to prevent scud and V2 sites from firing at the start of the mission. +* **[Mission Generation]** Added settings for controlling number of tactical commander, observer, JTAC, and game master slots. * **[Mission Planning]** Per-flight TOT offsets can now be set in the flight details UI. This allows individual flights to be scheduled ahead of or behind the rest of the package. ## Fixes diff --git a/game/missiongenerator/missiongenerator.py b/game/missiongenerator/missiongenerator.py index 38deaaa8..30fd0c54 100644 --- a/game/missiongenerator/missiongenerator.py +++ b/game/missiongenerator/missiongenerator.py @@ -353,6 +353,14 @@ class MissionGenerator: gen.generate() def setup_combined_arms(self) -> None: - self.mission.groundControl.pilot_can_control_vehicles = COMBINED_ARMS_SLOTS > 0 - self.mission.groundControl.blue_tactical_commander = COMBINED_ARMS_SLOTS - self.mission.groundControl.blue_observer = 1 + self.mission.groundControl.blue_game_masters = ( + self.game.settings.game_master_slots + ) + self.mission.groundControl.blue_tactical_commander = ( + self.game.settings.tactical_commander_slots + ) + self.mission.groundControl.pilot_can_control_vehicles = ( + self.mission.groundControl.blue_tactical_commander > 0 + ) + self.mission.groundControl.blue_jtac = self.game.settings.jtac_operator_slots + self.mission.groundControl.blue_observer = self.game.settings.observer_slots diff --git a/game/settings/settings.py b/game/settings/settings.py index 0c18eaa0..1c058bed 100644 --- a/game/settings/settings.py +++ b/game/settings/settings.py @@ -42,6 +42,8 @@ HQ_AUTOMATION_SECTION = "HQ Automation" MISSION_GENERATOR_PAGE = "Mission Generator" +COMMANDERS_SECTION = "Battlefield Commanders" + GAMEPLAY_SECTION = "Gameplay" # TODO: Make sections a type and add headers. @@ -310,6 +312,41 @@ class Settings: reserves_procurement_target: int = 10 # Mission Generator + + # Commanders + game_master_slots: int = bounded_int_option( + "Game master", + page=MISSION_GENERATOR_PAGE, + section=COMMANDERS_SECTION, + default=0, + min=0, + max=100, + ) + tactical_commander_slots: int = bounded_int_option( + "Tactical commander", + page=MISSION_GENERATOR_PAGE, + section=COMMANDERS_SECTION, + default=1, + min=0, + max=100, + ) + jtac_operator_slots: int = bounded_int_option( + "JTAC/Operator", + page=MISSION_GENERATOR_PAGE, + section=COMMANDERS_SECTION, + default=0, + min=0, + max=100, + ) + observer_slots: int = bounded_int_option( + "Observer", + page=MISSION_GENERATOR_PAGE, + section=COMMANDERS_SECTION, + default=1, + min=0, + max=100, + ) + # Gameplay fast_forward_to_first_contact: bool = boolean_option( "Fast forward mission to first contact (WIP)",