Clean up AircraftGenerator.

This class does far too many things and the file is huge. Split it up
into a few more classes.
This commit is contained in:
Dan Albert
2021-10-23 20:06:39 -07:00
parent 49033f67f3
commit 88b4039e47
32 changed files with 2014 additions and 1931 deletions

View File

@@ -40,8 +40,6 @@ class Flight:
self.roster = FlightRoster(self.squadron, initial_size=count)
else:
self.roster = roster
self.departure = self.squadron.location
self.arrival = self.squadron.arrival
self.divert = divert
self.flight_type = flight_type
# TODO: Replace with FlightPlan.
@@ -63,6 +61,14 @@ class Flight:
package=package, flight=self, custom_waypoints=[]
)
@property
def departure(self) -> ControlPoint:
return self.squadron.location
@property
def arrival(self) -> ControlPoint:
return self.squadron.arrival
@property
def count(self) -> int:
return self.roster.max_size