mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Refactor logic wrt "disable idle aircraft"
This commit is contained in:
parent
42f488df0b
commit
9ddaf50ad4
@ -151,9 +151,6 @@ class AircraftGenerator:
|
|||||||
def _spawn_unused_for(
|
def _spawn_unused_for(
|
||||||
self, squadron: Squadron, country: Country, faction: Faction
|
self, squadron: Squadron, country: Country, faction: Faction
|
||||||
) -> None:
|
) -> None:
|
||||||
if self.game.settings.perf_disable_idle_aircraft:
|
|
||||||
return
|
|
||||||
|
|
||||||
assert isinstance(squadron.location, Airfield)
|
assert isinstance(squadron.location, Airfield)
|
||||||
for _ in range(squadron.untasked_aircraft):
|
for _ in range(squadron.untasked_aircraft):
|
||||||
# Creating a flight even those this isn't a fragged mission lets us
|
# Creating a flight even those this isn't a fragged mission lets us
|
||||||
|
|||||||
@ -244,10 +244,11 @@ class MissionGenerator:
|
|||||||
self.game.red.ato,
|
self.game.red.ato,
|
||||||
tgo_generator.runways,
|
tgo_generator.runways,
|
||||||
)
|
)
|
||||||
aircraft_generator.spawn_unused_aircraft(
|
if not self.game.settings.perf_disable_idle_aircraft:
|
||||||
self.mission.country(self.game.blue.country_name),
|
aircraft_generator.spawn_unused_aircraft(
|
||||||
self.mission.country(self.game.red.country_name),
|
self.mission.country(self.game.blue.country_name),
|
||||||
)
|
self.mission.country(self.game.red.country_name),
|
||||||
|
)
|
||||||
|
|
||||||
for flight in aircraft_generator.flights:
|
for flight in aircraft_generator.flights:
|
||||||
if not flight.client_units:
|
if not flight.client_units:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user