mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Enabled SEAD Escort missions to be tasked on Naval targets and OCA/Aircraft missions on FARPs. When SEAD Escorts are tasked on Naval groups, they will also target ships.
This commit is contained in:
parent
2ea74d7435
commit
07de598aec
@ -11,6 +11,7 @@ from dcs.task import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from game.ato import FlightType
|
from game.ato import FlightType
|
||||||
|
from game.theater import NavalControlPoint
|
||||||
from game.utils import nautical_miles
|
from game.utils import nautical_miles
|
||||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||||
|
|
||||||
@ -32,9 +33,18 @@ class JoinPointBuilder(PydcsWaypointBuilder):
|
|||||||
waypoint.tasks.append(OptFormation.spread_four_open())
|
waypoint.tasks.append(OptFormation.spread_four_open())
|
||||||
|
|
||||||
elif self.flight.flight_type == FlightType.SEAD_ESCORT:
|
elif self.flight.flight_type == FlightType.SEAD_ESCORT:
|
||||||
self.configure_escort_tasks(
|
if isinstance(self.flight.package.target, NavalControlPoint):
|
||||||
waypoint, [Targets.All.GroundUnits.AirDefence.AAA.SAMRelated]
|
self.configure_escort_tasks(
|
||||||
)
|
waypoint,
|
||||||
|
[
|
||||||
|
Targets.All.Naval,
|
||||||
|
Targets.All.GroundUnits.AirDefence.AAA.SAMRelated,
|
||||||
|
],
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.configure_escort_tasks(
|
||||||
|
waypoint, [Targets.All.GroundUnits.AirDefence.AAA.SAMRelated]
|
||||||
|
)
|
||||||
|
|
||||||
# Let the AI use ECM to preemptively defend themselves.
|
# Let the AI use ECM to preemptively defend themselves.
|
||||||
ecm_option = OptECMUsing(value=OptECMUsing.Values.UseIfDetectedLockByRadar)
|
ecm_option = OptECMUsing(value=OptECMUsing.Values.UseIfDetectedLockByRadar)
|
||||||
|
|||||||
@ -1176,7 +1176,10 @@ class NavalControlPoint(ControlPoint, ABC):
|
|||||||
# TODO: Inter-ship logistics?
|
# TODO: Inter-ship logistics?
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
yield FlightType.ANTISHIP
|
yield from [
|
||||||
|
FlightType.ANTISHIP,
|
||||||
|
FlightType.SEAD_ESCORT,
|
||||||
|
]
|
||||||
yield from super().mission_types(for_player)
|
yield from super().mission_types(for_player)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -1424,6 +1427,7 @@ class Fob(ControlPoint):
|
|||||||
if not self.is_friendly(for_player):
|
if not self.is_friendly(for_player):
|
||||||
yield FlightType.STRIKE
|
yield FlightType.STRIKE
|
||||||
yield FlightType.AIR_ASSAULT
|
yield FlightType.AIR_ASSAULT
|
||||||
|
yield FlightType.OCA_AIRCRAFT
|
||||||
|
|
||||||
yield from super().mission_types(for_player)
|
yield from super().mission_types(for_player)
|
||||||
|
|
||||||
|
|||||||
@ -350,7 +350,10 @@ class NavalGroundObject(TheaterGroundObject, ABC):
|
|||||||
from game.ato import FlightType
|
from game.ato import FlightType
|
||||||
|
|
||||||
if not self.is_friendly(for_player):
|
if not self.is_friendly(for_player):
|
||||||
yield FlightType.ANTISHIP
|
yield from [
|
||||||
|
FlightType.ANTISHIP,
|
||||||
|
FlightType.SEAD_ESCORT,
|
||||||
|
]
|
||||||
yield from super().mission_types(for_player)
|
yield from super().mission_types(for_player)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user