Fix DEAD for many bombers, audit DEAD/SEAD lists.

Many of the aircraft that we use for DEAD are not actually capable of
the SEAD task in DCS, so they were being loaded as some other task type,
usually one that doesn't support Attack Group, which made them lose
their waypoint actions and do nothing.

This switches them to using CAS which supports a superset of the SEAD
capable aircraft.

I've also audited the SEAD/DEAD lists. The F-117 was removed because it
is not capable of Attack Group *at all*, and all the non-SEAD aircraft
that are capable of ground attack moved from SEAD to DEAD.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1086
This commit is contained in:
Dan Albert 2021-05-16 22:23:01 -07:00
parent c063a638cd
commit 6ca175345f
2 changed files with 27 additions and 22 deletions

View File

@ -728,7 +728,7 @@ class AircraftConflictGenerator:
def _setup_group( def _setup_group(
self, self,
group: FlyingGroup, group: FlyingGroup,
for_task: Type[Task], loadout_for_task: Type[Task],
package: Package, package: Package,
flight: Flight, flight: Flight,
dynamic_runways: Dict[str, RunwayData], dynamic_runways: Dict[str, RunwayData],
@ -742,10 +742,10 @@ class AircraftConflictGenerator:
p.pylons.clear() p.pylons.clear()
# Now load loadout # Now load loadout
if for_task in db.PLANE_PAYLOAD_OVERRIDES[unit_type]: if loadout_for_task in db.PLANE_PAYLOAD_OVERRIDES[unit_type]:
payload_name = db.PLANE_PAYLOAD_OVERRIDES[unit_type][for_task] payload_name = db.PLANE_PAYLOAD_OVERRIDES[unit_type][loadout_for_task]
group.load_loadout(payload_name) group.load_loadout(payload_name)
if not group.units[0].pylons and for_task == RunwayAttack: if not group.units[0].pylons and loadout_for_task == RunwayAttack:
if PinpointStrike in db.PLANE_PAYLOAD_OVERRIDES[unit_type]: if PinpointStrike in db.PLANE_PAYLOAD_OVERRIDES[unit_type]:
logging.warning( logging.warning(
'No loadout for "Runway Attack" for the {}, defaulting to Strike loadout'.format( 'No loadout for "Runway Attack" for the {}, defaulting to Strike loadout'.format(
@ -759,12 +759,12 @@ class AircraftConflictGenerator:
did_load_loadout = True did_load_loadout = True
logging.info( logging.info(
"Loaded overridden payload for {} - {} for task {}".format( "Loaded overridden payload for {} - {} for task {}".format(
unit_type, payload_name, for_task unit_type, payload_name, loadout_for_task
) )
) )
if not did_load_loadout: if not did_load_loadout:
group.load_task_default_loadout(for_task) group.load_task_default_loadout(loadout_for_task)
if unit_type in db.PLANE_LIVERY_OVERRIDES: if unit_type in db.PLANE_LIVERY_OVERRIDES:
for unit_instance in group.units: for unit_instance in group.units:
@ -1287,7 +1287,14 @@ class AircraftConflictGenerator:
flight: Flight, flight: Flight,
dynamic_runways: Dict[str, RunwayData], dynamic_runways: Dict[str, RunwayData],
) -> None: ) -> None:
group.task = SEAD.name # Only CAS and SEAD are capable of the Attack Group task. SEAD is arguably more
# appropriate but it has an extremely limited list of capable aircraft, whereas
# CAS has a much wider selection of units.
#
# Note that the only effect that the DCS task type has is in determining which
# waypoint actions the group may perform.
group.task = CAS.name
# But we still use the SEAD *loadout*.
self._setup_group(group, SEAD, package, flight, dynamic_runways) self._setup_group(group, SEAD, package, flight, dynamic_runways)
self.configure_behavior( self.configure_behavior(
group, group,

View File

@ -229,7 +229,7 @@ CAS_CAPABLE = [
] ]
# Aircraft used for SEAD tasks # Aircraft used for SEAD tasks. Must be capable of the SEAD DCS task.
SEAD_CAPABLE = [ SEAD_CAPABLE = [
JF_17, JF_17,
F_16C_50, F_16C_50,
@ -246,8 +246,18 @@ SEAD_CAPABLE = [
Su_30, Su_30,
MiG_27K, MiG_27K,
Tornado_GR4, Tornado_GR4,
F_117A, ]
B_17G,
# Aircraft used for DEAD tasks. Must be capable of the CAS DCS task.
DEAD_CAPABLE = [
AJS37,
F_14B,
F_14A_135_GR,
B_1B,
B_52H,
Tu_160,
Tu_95MS,
A_20G, A_20G,
P_47D_40, P_47D_40,
P_47D_30bl1, P_47D_30bl1,
@ -259,18 +269,6 @@ SEAD_CAPABLE = [
Bf_109K_4, Bf_109K_4,
FW_190D9, FW_190D9,
FW_190A8, FW_190A8,
]
# Aircraft used for DEAD tasks
DEAD_CAPABLE = [
AJS37,
F_14B,
F_14A_135_GR,
B_1B,
B_52H,
Tu_160,
Tu_95MS,
] + SEAD_CAPABLE ] + SEAD_CAPABLE