mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add options for number of Combined Arms slots
Resolves #74 - Game masters - Tactical commanders - JTAC - Observers
This commit is contained in:
parent
b25f484ef3
commit
9ab2fc1714
@ -43,9 +43,6 @@ if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
||||
|
||||
COMBINED_ARMS_SLOTS = 3
|
||||
|
||||
|
||||
def country_id_from_name(name: str) -> int:
|
||||
for k, v in country_dict.items():
|
||||
if v.name == name:
|
||||
@ -327,12 +324,11 @@ class MissionGenerator:
|
||||
gen.generate()
|
||||
|
||||
def setup_combined_arms(self) -> None:
|
||||
observers = 3
|
||||
self.mission.groundControl.pilot_can_control_vehicles = COMBINED_ARMS_SLOTS > 0
|
||||
self.mission.groundControl.blue_game_masters = 1
|
||||
self.mission.groundControl.blue_tactical_commander = COMBINED_ARMS_SLOTS
|
||||
self.mission.groundControl.blue_observer = observers
|
||||
self.mission.groundControl.red_game_masters = 1
|
||||
self.mission.groundControl.red_tactical_commander = COMBINED_ARMS_SLOTS
|
||||
self.mission.groundControl.red_observer = observers
|
||||
self.mission.groundControl.neutrals_observer = observers
|
||||
settings = self.game.settings
|
||||
commanders = settings.tactical_commander_count
|
||||
self.mission.groundControl.pilot_can_control_vehicles = commanders > 0
|
||||
|
||||
self.mission.groundControl.blue_game_masters = settings.game_masters_count
|
||||
self.mission.groundControl.blue_tactical_commander = commanders
|
||||
self.mission.groundControl.blue_jtac = settings.jtac_count
|
||||
self.mission.groundControl.blue_observer = settings.observer_count
|
||||
|
||||
@ -416,6 +416,54 @@ class Settings:
|
||||
"within threatened airspace."
|
||||
),
|
||||
)
|
||||
game_masters_count: int = bounded_int_option(
|
||||
"Number of game masters",
|
||||
page=MISSION_GENERATOR_PAGE,
|
||||
section=GAMEPLAY_SECTION,
|
||||
default=1,
|
||||
min=0,
|
||||
max=10,
|
||||
detail=(
|
||||
"The number of game master slots to generate for each side. "
|
||||
"Game masters can see, control & direct all units in the mission."
|
||||
),
|
||||
)
|
||||
tactical_commander_count: int = bounded_int_option(
|
||||
"Number of tactical commands",
|
||||
page=MISSION_GENERATOR_PAGE,
|
||||
section=GAMEPLAY_SECTION,
|
||||
default=3,
|
||||
min=0,
|
||||
max=10,
|
||||
detail=(
|
||||
"The number of tactical commander slots to generate for each side. "
|
||||
"Tactical commanders can control & direct friendly units."
|
||||
),
|
||||
)
|
||||
jtac_count: int = bounded_int_option(
|
||||
"Number of JTAC controllers",
|
||||
page=MISSION_GENERATOR_PAGE,
|
||||
section=GAMEPLAY_SECTION,
|
||||
default=3,
|
||||
min=0,
|
||||
max=10,
|
||||
detail=(
|
||||
"The number of JTAC controller slots to generate for each side. "
|
||||
"JTAC operators can only control friendly units."
|
||||
),
|
||||
)
|
||||
observer_count: int = bounded_int_option(
|
||||
"Number of observers",
|
||||
page=MISSION_GENERATOR_PAGE,
|
||||
section=GAMEPLAY_SECTION,
|
||||
default=0,
|
||||
min=0,
|
||||
max=10,
|
||||
detail=(
|
||||
"The number of observers slots to generate for each side. "
|
||||
'Use this to allow spectators when disabling "Allow external views".'
|
||||
),
|
||||
)
|
||||
|
||||
# Performance
|
||||
perf_smoke_gen: bool = boolean_option(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user