mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Clean up remaining Flight.from_cp users.
The preferred API for this has been `Flight.departure` for a while.
This commit is contained in:
0
game/aircraftparkinglocation.py
Normal file
0
game/aircraftparkinglocation.py
Normal file
@@ -149,10 +149,6 @@ class Flight(SidcDescribable):
|
||||
def is_helo(self) -> bool:
|
||||
return self.unit_type.dcs_unit_type.helicopter
|
||||
|
||||
@property
|
||||
def from_cp(self) -> ControlPoint:
|
||||
return self.departure
|
||||
|
||||
@property
|
||||
def points(self) -> List[FlightWaypoint]:
|
||||
return self.flight_plan.waypoints[1:]
|
||||
|
||||
@@ -283,7 +283,7 @@ class FlightPlan(ABC, Generic[LayoutT]):
|
||||
def estimate_ground_ops(self) -> timedelta:
|
||||
if self.flight.start_type in {StartType.RUNWAY, StartType.IN_FLIGHT}:
|
||||
return timedelta()
|
||||
if self.flight.from_cp.is_fleet:
|
||||
if self.flight.departure.is_fleet:
|
||||
return timedelta(minutes=2)
|
||||
else:
|
||||
return timedelta(minutes=8)
|
||||
|
||||
@@ -110,7 +110,7 @@ class FlightGroupConfigurator:
|
||||
flight_type=self.flight.flight_type,
|
||||
units=self.group.units,
|
||||
size=len(self.group.units),
|
||||
friendly=self.flight.from_cp.captured,
|
||||
friendly=self.flight.departure.captured,
|
||||
departure_delay=mission_start_time,
|
||||
departure=self.flight.departure.active_runway(
|
||||
self.game.theater, self.game.conditions, self.dynamic_runways
|
||||
|
||||
@@ -286,7 +286,7 @@ class WaypointGenerator:
|
||||
# hot aircraft hours before their takeoff time.
|
||||
return True
|
||||
|
||||
if self.flight.from_cp.is_fleet:
|
||||
if self.flight.departure.is_fleet:
|
||||
# Carrier spawns will crowd the carrier deck, especially without
|
||||
# super carrier.
|
||||
# TODO: Is there enough parking on the supercarrier?
|
||||
|
||||
Reference in New Issue
Block a user