mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Reintroduce legacy SEAD Escort flight plan, but under a separate type because it didn't really escort the primary flight...
28 lines
841 B
Python
28 lines
841 B
Python
from dcs.point import MovingPoint
|
|
from dcs.task import (
|
|
OptECMUsing,
|
|
ControlledTask,
|
|
EngageTargets,
|
|
Targets,
|
|
)
|
|
|
|
from game.utils import nautical_miles
|
|
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
|
|
|
|
|
class SeadSweepIngressBuilder(PydcsWaypointBuilder):
|
|
def add_tasks(self, waypoint: MovingPoint) -> None:
|
|
# Preemptively use ECM to better avoid getting swatted.
|
|
ecm_option = OptECMUsing(value=OptECMUsing.Values.UseIfDetectedLockByRadar)
|
|
waypoint.tasks.append(ecm_option)
|
|
|
|
waypoint.add_task(
|
|
ControlledTask(
|
|
EngageTargets(
|
|
# TODO: From doctrine.
|
|
max_distance=int(nautical_miles(30).meters),
|
|
targets=[Targets.All.GroundUnits.AirDefence.AAA.SAMRelated],
|
|
)
|
|
)
|
|
)
|