mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Refactor patrol_duration for refueling flight-plans
This commit is contained in:
parent
15e6f81bb5
commit
ef77637c9a
@ -1,10 +1,15 @@
|
||||
from abc import ABC
|
||||
from datetime import timedelta
|
||||
|
||||
from game.utils import Distance, Speed, knots, meters
|
||||
from game.utils import Speed, knots, Distance, meters
|
||||
from .patrolling import PatrollingFlightPlan, PatrollingLayout
|
||||
|
||||
|
||||
class RefuelingFlightPlan(PatrollingFlightPlan[PatrollingLayout], ABC):
|
||||
@property
|
||||
def patrol_duration(self) -> timedelta:
|
||||
return self.flight.coalition.game.settings.desired_tanker_on_station_time
|
||||
|
||||
@property
|
||||
def patrol_speed(self) -> Speed:
|
||||
# TODO: Could use self.flight.unit_type.preferred_patrol_speed(altitude).
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from typing import Type
|
||||
|
||||
from game.ato.flightplans.ibuilder import IBuilder
|
||||
@ -16,10 +15,6 @@ class RecoveryTankerFlightPlan(RefuelingFlightPlan):
|
||||
def builder_type() -> Type[Builder]:
|
||||
return Builder
|
||||
|
||||
@property
|
||||
def patrol_duration(self) -> timedelta:
|
||||
return self.flight.coalition.game.settings.desired_tanker_on_station_time
|
||||
|
||||
@property
|
||||
def tot_waypoint(self) -> FlightWaypoint:
|
||||
return self.layout.departure
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from typing import Type
|
||||
|
||||
from game.utils import Heading, meters, nautical_miles
|
||||
@ -15,10 +14,6 @@ class TheaterRefuelingFlightPlan(RefuelingFlightPlan):
|
||||
def builder_type() -> Type[Builder]:
|
||||
return Builder
|
||||
|
||||
@property
|
||||
def patrol_duration(self) -> timedelta:
|
||||
return self.flight.coalition.game.settings.desired_tanker_on_station_time
|
||||
|
||||
|
||||
class Builder(IBuilder[TheaterRefuelingFlightPlan, PatrollingLayout]):
|
||||
def layout(self) -> PatrollingLayout:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user