Set the flight airfields based on the Squadron.

This commit is contained in:
Dan Albert
2021-08-31 22:11:59 -07:00
parent a404792bd2
commit f9f0b429b6
6 changed files with 13 additions and 22 deletions

View File

@@ -54,8 +54,6 @@ class PackageBuilder:
plan.num_aircraft,
plan.task,
start_type,
departure=airfield,
arrival=airfield,
divert=self.find_divert_field(squadron.aircraft, airfield),
)
self.package.add_flight(flight)

View File

@@ -308,6 +308,10 @@ class Squadron:
def expected_size_next_turn(self) -> int:
return self.owned_aircraft + self.pending_deliveries
@property
def arrival(self) -> ControlPoint:
return self.location if self.destination is None else self.destination
def plan_relocation(self, destination: ControlPoint) -> None:
if destination == self.location:
logging.warning(

View File

@@ -360,8 +360,6 @@ class AirliftPlanner:
flight_size,
FlightType.TRANSPORT,
start_type,
departure=squadron.location,
arrival=squadron.location,
divert=None,
cargo=transfer,
)