Skip completed flights during mission generation

This commit is contained in:
Raffson 2024-06-01 21:15:36 +02:00
parent c399002d1d
commit b501009285
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -119,7 +119,7 @@ class AircraftGenerator:
if not package.flights: if not package.flights:
continue continue
for flight in package.flights: 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(): if not flight.squadron.location.runway_is_operational():
logging.warning( logging.warning(
f"Runway not operational, skipping flight: {flight.flight_type}" f"Runway not operational, skipping flight: {flight.flight_type}"