Player Startup Time customization (#377)

This commit is contained in:
tmz42 2024-07-27 18:08:40 +02:00 committed by GitHub
parent cc6fbc0379
commit 9e9ea09f70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View File

@ -27,6 +27,7 @@
* **[Plugins]** Support for Carsten's Arty Spotter script * **[Plugins]** Support for Carsten's Arty Spotter script
* **[Modding]** Added support for SK-60 mod (v1.2.1) * **[Modding]** Added support for SK-60 mod (v1.2.1)
* **[Mission Generation]** Introducing the Armed Recon flight plan, i.e. CAS against any Theater Ground Object * **[Mission Generation]** Introducing the Armed Recon flight plan, i.e. CAS against any Theater Ground Object
* **[Doctrine]** Ability to customize the startup time allocated to the player
## Fixes ## Fixes
* **[UI/UX]** A-10A flights can be edited again * **[UI/UX]** A-10A flights can be edited again

View File

@ -255,7 +255,9 @@ class FlightPlan(ABC, Generic[LayoutT]):
def estimate_startup(self) -> timedelta: def estimate_startup(self) -> timedelta:
if self.flight.start_type is StartType.COLD: if self.flight.start_type is StartType.COLD:
if self.flight.client_count: if self.flight.client_count:
return timedelta(minutes=10) return timedelta(
minutes=self.flight.coalition.game.settings.player_startup_time
)
else: else:
# The AI doesn't seem to have a real startup procedure. # The AI doesn't seem to have a real startup procedure.
return timedelta(minutes=2) return timedelta(minutes=2)

View File

@ -308,6 +308,20 @@ class Settings:
default=2, default=2,
detail="Creates a randomized altitude offset for airplanes.", detail="Creates a randomized altitude offset for airplanes.",
) )
player_startup_time: int = bounded_int_option(
"Player startup time",
page=CAMPAIGN_DOCTRINE_PAGE,
section=GENERAL_SECTION,
default=10,
min=0,
max=100,
detail=(
"The startup time allocated to player flights (default : 10 minutes, AI is 2 minutes). "
"Takes effect after the next turn. "
),
)
# Doctrine Distances Section # Doctrine Distances Section
airbase_threat_range: int = bounded_int_option( airbase_threat_range: int = bounded_int_option(
"Airbase threat range (NM)", "Airbase threat range (NM)",
@ -415,6 +429,7 @@ class Settings:
"range is defined in the helicopter's yaml specification." "range is defined in the helicopter's yaml specification."
), ),
) )
# Pilots and Squadrons # Pilots and Squadrons
ai_pilot_levelling: bool = boolean_option( ai_pilot_levelling: bool = boolean_option(
"Allow AI pilot leveling", "Allow AI pilot leveling",