Dan Albert 7a57bd3ee0
Save the TOT offset in the flight plan.
Prep work for exposing this to the UI.
2023-06-04 00:31:38 +02:00

29 lines
766 B
Python

from __future__ import annotations
from datetime import timedelta
from typing import Type
from .formationattack import (
FormationAttackBuilder,
FormationAttackFlightPlan,
FormationAttackLayout,
)
from ..flightwaypointtype import FlightWaypointType
class SeadFlightPlan(FormationAttackFlightPlan):
@staticmethod
def builder_type() -> Type[Builder]:
return Builder
def default_tot_offset(self) -> timedelta:
return -timedelta(minutes=1)
class Builder(FormationAttackBuilder[SeadFlightPlan, FormationAttackLayout]):
def layout(self) -> FormationAttackLayout:
return self._build(FlightWaypointType.INGRESS_SEAD)
def build(self) -> SeadFlightPlan:
return SeadFlightPlan(self.flight, self.layout())