Reference primary flight's RTB time for Escort's split wpt

This commit is contained in:
Raffson 2024-12-24 05:08:58 +01:00
parent 8b03bc496d
commit 15e6f81bb5
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -1,5 +1,6 @@
from __future__ import annotations
from datetime import datetime
from typing import Type
from .airassault import AirAssaultLayout
@ -20,6 +21,13 @@ class EscortFlightPlan(FormationAttackFlightPlan):
def builder_type() -> Type[Builder]:
return Builder
@property
def split_time(self) -> datetime:
if self.package.primary_flight and self.package.primary_flight.flight_plan:
return self.package.primary_flight.flight_plan.mission_departure_time
else:
return super().split_time
class Builder(FormationAttackBuilder[EscortFlightPlan, FormationAttackLayout]):
def layout(self) -> FormationAttackLayout: