Run aircraft_generator.generate_packages() only once per ATO, instead of multiple times. Fixed the duplicated flights issue.

This commit is contained in:
MetalStormGhost 2023-09-18 18:23:03 +03:00
parent 91cfff58d9
commit 95bac8ec17

View File

@ -221,14 +221,16 @@ class PretenseMissionGenerator(MissionGenerator):
ato, ato,
) )
for cp in self.game.theater.controlpoints:
if cp.captured:
ato = self.game.blue.ato ato = self.game.blue.ato
country = self.p_country country = self.p_country
else: aircraft_generator.generate_packages(
country,
ato,
tgo_generator.runways,
)
ato = self.game.red.ato ato = self.game.red.ato
country = self.e_country country = self.e_country
aircraft_generator.generate_packages( aircraft_generator.generate_packages(
country, country,
ato, ato,