Refactor logic wrt "disable idle aircraft"

This commit is contained in:
Raffson 2023-01-01 16:06:36 +01:00
parent 42f488df0b
commit 9ddaf50ad4
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 5 additions and 7 deletions

View File

@ -151,9 +151,6 @@ 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

@ -244,6 +244,7 @@ class MissionGenerator:
self.game.red.ato,
tgo_generator.runways,
)
if not self.game.settings.perf_disable_idle_aircraft:
aircraft_generator.spawn_unused_aircraft(
self.mission.country(self.game.blue.country_name),
self.mission.country(self.game.red.country_name),