diff --git a/game/data/weapons.py b/game/data/weapons.py index 23db497d..73b8d0d7 100644 --- a/game/data/weapons.py +++ b/game/data/weapons.py @@ -97,6 +97,7 @@ class WeaponType(Enum): ARM = "ARM" LGB = "LGB" TGP = "TGP" + DECOY = "decoy" UNKNOWN = "unknown" diff --git a/game/missiongenerator/aircraft/waypoints/seadingress.py b/game/missiongenerator/aircraft/waypoints/seadingress.py index 3bbbcf81..ba9a5cd5 100644 --- a/game/missiongenerator/aircraft/waypoints/seadingress.py +++ b/game/missiongenerator/aircraft/waypoints/seadingress.py @@ -9,7 +9,6 @@ from dcs.task import ( WeaponType as DcsWeaponType, ) from game.data.weapons import WeaponType - from game.theater import TheaterGroundObject from .pydcswaypointbuilder import PydcsWaypointBuilder @@ -45,8 +44,20 @@ class SeadIngressBuilder(PydcsWaypointBuilder): engage_task.params["groupAttack"] = True engage_task.params["expend"] = Expend.All.value waypoint.tasks.append(engage_task) + elif self.flight.loadout.has_weapon_of_type(WeaponType.DECOY): + # Special handling for DECOY weapon types: + # - Specify that DECOY weapon type is used in AttackGroup task so that + # the flight actually launches the decoy. See link below for details + # https://github.com/dcs-liberation/dcs_liberation/issues/2780 + attack_task = AttackGroup( + miz_group.id, + weapon_type=DcsWeaponType.Decoy, + group_attack=True, + expend=Expend.All, + ) + waypoint.tasks.append(attack_task) else: - # All non ARM types like Decoys will use the normal AttackGroup Task + # All non ARM and non DECOY types will use the normal AttackGroup Task attack_task = AttackGroup( miz_group.id, weapon_type=DcsWeaponType.Guided, diff --git a/resources/weapons/standoff/ADM-141A.yaml b/resources/weapons/standoff/ADM-141A.yaml new file mode 100644 index 00000000..7d4c2e4f --- /dev/null +++ b/resources/weapons/standoff/ADM-141A.yaml @@ -0,0 +1,9 @@ +name: ADM-141A TALD +# https://www.designation-systems.net/dusrm/m-141.html +year: 1987 +type: decoy +clsids: + - "{BRU42_ADM141}" + - "{BRU3242_ADM141}" + - "{ADM_141A}" + - "{ADM_141B}"