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,
|
ControlledTask,
|
||||||
EngageTargets,
|
EngageTargets,
|
||||||
Targets,
|
Targets,
|
||||||
|
OptROE,
|
||||||
)
|
)
|
||||||
|
|
||||||
from game.utils import nautical_miles
|
from game.utils import nautical_miles
|
||||||
@ -13,6 +14,7 @@ from .pydcswaypointbuilder import PydcsWaypointBuilder
|
|||||||
class SeadSweepIngressBuilder(PydcsWaypointBuilder):
|
class SeadSweepIngressBuilder(PydcsWaypointBuilder):
|
||||||
def add_tasks(self, waypoint: MovingPoint) -> None:
|
def add_tasks(self, waypoint: MovingPoint) -> None:
|
||||||
self.register_special_ingress_points()
|
self.register_special_ingress_points()
|
||||||
|
waypoint.tasks.append(OptROE(value=OptROE.Values.OpenFireWeaponFree))
|
||||||
# Preemptively use ECM to better avoid getting swatted.
|
# Preemptively use ECM to better avoid getting swatted.
|
||||||
ecm_option = OptECMUsing(value=OptECMUsing.Values.UseIfDetectedLockByRadar)
|
ecm_option = OptECMUsing(value=OptECMUsing.Values.UseIfDetectedLockByRadar)
|
||||||
waypoint.tasks.append(ecm_option)
|
waypoint.tasks.append(ecm_option)
|
||||||
@ -26,7 +28,7 @@ class SeadSweepIngressBuilder(PydcsWaypointBuilder):
|
|||||||
self.flight.coalition.game.settings.sead_sweep_engagement_range_distance
|
self.flight.coalition.game.settings.sead_sweep_engagement_range_distance
|
||||||
).meters
|
).meters
|
||||||
),
|
),
|
||||||
targets=[Targets.All.GroundUnits.AirDefence.AAA.SAMRelated],
|
targets=[Targets.All.GroundUnits.AirDefence],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from dcs.point import MovingPoint
|
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.ato.flightplans.sweep import SweepFlightPlan
|
||||||
from game.utils import nautical_miles
|
from game.utils import nautical_miles
|
||||||
@ -16,6 +16,8 @@ class SweepIngressBuilder(PydcsWaypointBuilder):
|
|||||||
else:
|
else:
|
||||||
waypoint.tasks.append(OptFormation.spread_four_open())
|
waypoint.tasks.append(OptFormation.spread_four_open())
|
||||||
|
|
||||||
|
waypoint.tasks.append(OptROE(value=OptROE.Values.OpenFireWeaponFree))
|
||||||
|
|
||||||
if not isinstance(self.flight.flight_plan, SweepFlightPlan):
|
if not isinstance(self.flight.flight_plan, SweepFlightPlan):
|
||||||
flight_plan_type = self.flight.flight_plan.__class__.__name__
|
flight_plan_type = self.flight.flight_plan.__class__.__name__
|
||||||
logging.error(
|
logging.error(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user