mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
During package planning we don't care about the details of the flight plan, just the layout (to check if the layout is threatened and we need escorts). Splitting these will allow us to reduce the amount of work that must be done in each loop of the planning phase, potentially caching attempted flight plans between loops.
31 lines
775 B
Python
31 lines
775 B
Python
from __future__ import annotations
|
|
|
|
from datetime import timedelta
|
|
from typing import Type
|
|
|
|
from .formationattack import (
|
|
FormationAttackBuilder,
|
|
FormationAttackFlightPlan,
|
|
FormationAttackLayout,
|
|
)
|
|
from .. import Flight
|
|
from ..flightwaypointtype import FlightWaypointType
|
|
|
|
|
|
class SeadFlightPlan(FormationAttackFlightPlan):
|
|
def __init__(self, flight: Flight, layout: FormationAttackLayout) -> None:
|
|
super().__init__(flight, layout)
|
|
|
|
@staticmethod
|
|
def builder_type() -> Type[Builder]:
|
|
return Builder
|
|
|
|
@property
|
|
def lead_time(self) -> timedelta:
|
|
return timedelta(minutes=1)
|
|
|
|
|
|
class Builder(FormationAttackBuilder):
|
|
def build(self) -> FormationAttackLayout:
|
|
return self._build(FlightWaypointType.INGRESS_SEAD)
|