Skip completed flights during mission generation

This commit is contained in:
Raffson
2024-06-01 21:15:36 +02:00
parent c399002d1d
commit b501009285

View File

@@ -119,7 +119,7 @@ class AircraftGenerator:
if not package.flights:
continue
for flight in package.flights:
if flight.alive:
if flight.alive and not isinstance(flight.state, Completed):
if not flight.squadron.location.runway_is_operational():
logging.warning(
f"Runway not operational, skipping flight: {flight.flight_type}"