mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
ROE optimisations
This commit is contained in:
parent
f54993f579
commit
e4b67ffb8a
@ -4,6 +4,7 @@ from dcs.task import (
|
||||
ControlledTask,
|
||||
EngageTargets,
|
||||
Targets,
|
||||
OptROE,
|
||||
)
|
||||
|
||||
from game.utils import nautical_miles
|
||||
@ -13,6 +14,7 @@ from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
class SeadSweepIngressBuilder(PydcsWaypointBuilder):
|
||||
def add_tasks(self, waypoint: MovingPoint) -> None:
|
||||
self.register_special_ingress_points()
|
||||
waypoint.tasks.append(OptROE(value=OptROE.Values.OpenFireWeaponFree))
|
||||
# Preemptively use ECM to better avoid getting swatted.
|
||||
ecm_option = OptECMUsing(value=OptECMUsing.Values.UseIfDetectedLockByRadar)
|
||||
waypoint.tasks.append(ecm_option)
|
||||
@ -26,7 +28,7 @@ class SeadSweepIngressBuilder(PydcsWaypointBuilder):
|
||||
self.flight.coalition.game.settings.sead_sweep_engagement_range_distance
|
||||
).meters
|
||||
),
|
||||
targets=[Targets.All.GroundUnits.AirDefence.AAA.SAMRelated],
|
||||
targets=[Targets.All.GroundUnits.AirDefence],
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
from dcs.point import MovingPoint
|
||||
from dcs.task import EngageTargets, OptFormation, Targets
|
||||
from dcs.task import EngageTargets, OptFormation, Targets, OptROE
|
||||
|
||||
from game.ato.flightplans.sweep import SweepFlightPlan
|
||||
from game.utils import nautical_miles
|
||||
@ -16,6 +16,8 @@ class SweepIngressBuilder(PydcsWaypointBuilder):
|
||||
else:
|
||||
waypoint.tasks.append(OptFormation.spread_four_open())
|
||||
|
||||
waypoint.tasks.append(OptROE(value=OptROE.Values.OpenFireWeaponFree))
|
||||
|
||||
if not isinstance(self.flight.flight_plan, SweepFlightPlan):
|
||||
flight_plan_type = self.flight.flight_plan.__class__.__name__
|
||||
logging.error(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user