diff --git a/dcs/action.py b/dcs/action.py index c28e5630..337096ad 100644 --- a/dcs/action.py +++ b/dcs/action.py @@ -1408,6 +1408,28 @@ def dict(self): return d +class SoundToUnit(Action): + predicate = "a_out_sound_u" + + def __init__(self, unit="", file_res_key: Optional[ResourceKey] = None): + super(SoundToUnit, self).__init__(SoundToGroup.predicate) + self.unit = unit + if file_res_key: + self.params.append(self.unit) + self.file_res_key = file_res_key + self.params.append(self.file_res_key) + + @classmethod + def create_from_dict(cls, d, mission): + return cls(d["unit"], ResourceKey(d["file"])) + + def dict(self): + d = super(SoundToUnit, self).dict() + d["unit"] = self.unit + d["file"] = self.file_res_key.key + return d + + class StartListenCockpitEvent(Action): predicate = "a_start_listen_event" @@ -1614,7 +1636,9 @@ def __init__(self, groupid, task_index): @classmethod def create_from_dict(cls, d, mission): - return cls(d["set_ai_task"][0], d["ai_task"][1]) + # Not sure if this used to be 0/1 in older missions, if + # so this needs a conditional. + return cls(d["set_ai_task"][1], d["set_ai_task"][2]) def dict(self): d = super(AITaskSet, self).dict() @@ -1823,6 +1847,7 @@ def dict(self): "a_out_sound_s": SoundToCoalition, "a_out_sound_c": SoundToCountry, "a_out_sound_g": SoundToGroup, + "a_out_sound_u": SoundToUnit, "a_start_listen_event": StartListenCockpitEvent, "a_start_listen_command": StartListenCommand, "a_cockpit_lock_player_seat": StartPlayerSeatLock, diff --git a/dcs/drawing/drawing.py b/dcs/drawing/drawing.py index 2ad0badc..4a983f20 100644 --- a/dcs/drawing/drawing.py +++ b/dcs/drawing/drawing.py @@ -30,6 +30,14 @@ class LineStyle(Enum): Wirefence = "wirefence" Dot2 = "dot2" Solid2 = "solid2" + DotDash = "dotdash" + StrongPoint = "strongpoint" + WireFence = "wirefence" + Boundry1 = "boundry1" + Boundry2 = "boundry2" + Boundry3 = "boundry3" + Boundry4 = "boundry4" + Boundry5 = "boundry5" @dataclass diff --git a/tools/actions_export.py b/tools/actions_export.py index 032e9a57..b90c38d5 100644 --- a/tools/actions_export.py +++ b/tools/actions_export.py @@ -215,6 +215,22 @@ ] }, + "SoundToUnit": { + "name": "a_out_sound_u", + "fields": [ + { + "id": "unit", + "type": "combo", + "default": "", + }, + { + "id": "file", + "type": "file_edit", + "default": "", + }, + ] + }, + "SoundToCountry": { "name": "a_out_sound_c", "fields": [