mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Add decoy weapon type and configure AI tasks.
See https://github.com/dcs-liberation/dcs_liberation/pull/2810 for more discussion. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2780.
This commit is contained in:
parent
e2c6d6788c
commit
4bf8f25d31
@ -97,6 +97,7 @@ class WeaponType(Enum):
|
||||
ARM = "ARM"
|
||||
LGB = "LGB"
|
||||
TGP = "TGP"
|
||||
DECOY = "decoy"
|
||||
UNKNOWN = "unknown"
|
||||
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
9
resources/weapons/standoff/ADM-141A.yaml
Normal file
9
resources/weapons/standoff/ADM-141A.yaml
Normal file
@ -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}"
|
||||
Loading…
x
Reference in New Issue
Block a user