mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user