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
|
from game import Game
|
||||||
|
|
||||||
|
|
||||||
COMBINED_ARMS_SLOTS = 3
|
|
||||||
|
|
||||||
|
|
||||||
def country_id_from_name(name: str) -> int:
|
def country_id_from_name(name: str) -> int:
|
||||||
for k, v in country_dict.items():
|
for k, v in country_dict.items():
|
||||||
if v.name == name:
|
if v.name == name:
|
||||||
@ -327,12 +324,11 @@ class MissionGenerator:
|
|||||||
gen.generate()
|
gen.generate()
|
||||||
|
|
||||||
def setup_combined_arms(self) -> None:
|
def setup_combined_arms(self) -> None:
|
||||||
observers = 3
|
settings = self.game.settings
|
||||||
self.mission.groundControl.pilot_can_control_vehicles = COMBINED_ARMS_SLOTS > 0
|
commanders = settings.tactical_commander_count
|
||||||
self.mission.groundControl.blue_game_masters = 1
|
self.mission.groundControl.pilot_can_control_vehicles = commanders > 0
|
||||||
self.mission.groundControl.blue_tactical_commander = COMBINED_ARMS_SLOTS
|
|
||||||
self.mission.groundControl.blue_observer = observers
|
self.mission.groundControl.blue_game_masters = settings.game_masters_count
|
||||||
self.mission.groundControl.red_game_masters = 1
|
self.mission.groundControl.blue_tactical_commander = commanders
|
||||||
self.mission.groundControl.red_tactical_commander = COMBINED_ARMS_SLOTS
|
self.mission.groundControl.blue_jtac = settings.jtac_count
|
||||||
self.mission.groundControl.red_observer = observers
|
self.mission.groundControl.blue_observer = settings.observer_count
|
||||||
self.mission.groundControl.neutrals_observer = observers
|
|
||||||
|
|||||||
@ -416,6 +416,54 @@ class Settings:
|
|||||||
"within threatened airspace."
|
"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
|
# Performance
|
||||||
perf_smoke_gen: bool = boolean_option(
|
perf_smoke_gen: bool = boolean_option(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user