Add settings for battlefield commander slots.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2235.
This commit is contained in:
Dan Albert
2023-05-30 21:58:49 -07:00
parent 6699289bf7
commit fe96a415be
3 changed files with 49 additions and 3 deletions

View File

@@ -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

View File

@@ -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)",