Add UI-zone for SEAD Sweep

This commit is contained in:
Raffson 2024-09-21 19:30:21 +02:00
parent a7d091c142
commit 7a84181bbc
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -8,10 +8,12 @@ from .formationattack import (
FormationAttackFlightPlan,
FormationAttackLayout,
)
from .uizonedisplay import UiZoneDisplay, UiZone
from ..flightwaypointtype import FlightWaypointType
from ...utils import nautical_miles
class SeadSweepFlightPlan(FormationAttackFlightPlan):
class SeadSweepFlightPlan(FormationAttackFlightPlan, UiZoneDisplay):
@staticmethod
def builder_type() -> Type[Builder]:
return Builder
@ -19,6 +21,14 @@ class SeadSweepFlightPlan(FormationAttackFlightPlan):
def default_tot_offset(self) -> timedelta:
return -timedelta(minutes=2)
def ui_zone(self) -> UiZone:
return UiZone(
[self.tot_waypoint.position],
nautical_miles(
self.flight.coalition.game.settings.sead_sweep_engagement_range_distance
),
)
class Builder(FormationAttackBuilder[SeadSweepFlightPlan, FormationAttackLayout]):
def layout(self) -> FormationAttackLayout: