Add new performance option: Disable idle aircraft at airfields (#37)

This commit is contained in:
MetalStormGhost
2022-12-16 19:59:21 +02:00
committed by GitHub
parent 7d2dd0bcbe
commit 15f6c8dd85
3 changed files with 10 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ BAI/ANTISHIP/DEAD/STRIKE/BARCAP/CAS/OCA/AIR-ASSAULT (main) missions
* **[Performance]** Added performance option: Maximum front-line unit supply per control point.
* **[Performance]** Added performance option: Disable convoys.
* **[Performance]** Added performance option: Front-line troops prefer roads.
* **[Performance]** Added performance option: Disable idle aircraft at airfields.
* **[Squadrons]** Squadron pilot limits enabled by default.
* **[UI]** Add livery selector to Air Wing Configurator's squadrons.

View File

@@ -151,6 +151,9 @@ class AircraftGenerator:
def _spawn_unused_for(
self, squadron: Squadron, country: Country, faction: Faction
) -> None:
if self.game.settings.perf_disable_idle_aircraft:
return
assert isinstance(squadron.location, Airfield)
for _ in range(squadron.untasked_aircraft):
# Creating a flight even those this isn't a fragged mission lets us

View File

@@ -482,6 +482,12 @@ class Settings:
section=PERFORMANCE_SECTION,
default=True,
)
perf_disable_idle_aircraft: bool = boolean_option(
"Disable idle aircraft at airfields",
page=MISSION_GENERATOR_PAGE,
section=PERFORMANCE_SECTION,
default=False,
)
# Performance culling
perf_culling: bool = boolean_option(
"Culling of distant units enabled",