From bfc9d357d6236b5c4b392001b87921da2ae609c2 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 24 Feb 2026 15:30:16 +0100 Subject: [PATCH 1/2] Update Auftrag.lua - Added GetCargoSet function --- Moose Development/Moose/Ops/Auftrag.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index 05b5cfa72..23bf9f822 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -2143,6 +2143,7 @@ function AUFTRAG:NewTROOPTRANSPORT(TransportGroupSet, DropoffCoordinate, PickupC end --- **[AIR ROTARY]** Create a CARGO TRANSPORT mission. +-- This mission is for helicopters only, which transport cargo externally via slingload. -- **Important Note:** -- The dropoff zone has to be a zone defined in the Mission Editor. This is due to a restriction in the used DCS task, which takes the zone ID as input. -- Only ME zones have an ID that can be referenced. @@ -5710,6 +5711,27 @@ function AUFTRAG:GetTargetLife() end end +--- Get cargo items as set SET object. +-- This returns the cargo item(s) as set `SET` object for mission types `CARGOTRANSPORT`, `TROOPTRANSPORT` and `FREIGHTTRANSPORT`. +-- @param #AUFTRAG self +-- @return Core.Set#SET_BASE The cargo set. +function AUFTRAG:GetCargoSet() + + if self.type==AUFTRAG.Type.CARGOTRANSPORT then + local set=SET_STATIC:New() + set:AddObject(self.DCStask.params.cargo) + return set + elseif self.type==AUFTRAG.Type.TROOPTRANSPORT then + return self.transportGroupSet + elseif self.type==AUFTRAG.Type.FREIGHTTRANSPORT then + return self.DCStask.params.cargo + else + self:E(self.lid.."ERROR: GetCargoSet() is only for transport types!") + return nil + end + +end + --- Get target. -- @param #AUFTRAG self -- @return Ops.Target#TARGET The target object. Could be many things. From 5ff5da9d9a181eb8383bcab80c3c01f3f9187a03 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 26 Feb 2026 08:08:44 +0100 Subject: [PATCH 2/2] Update Enums.lua - Added new Weapon type enums - Added torpedos to Auto weapon type --- Moose Development/Moose/Utilities/Enums.lua | 32 ++++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/Moose Development/Moose/Utilities/Enums.lua b/Moose Development/Moose/Utilities/Enums.lua index f1d499109..1281bbf64 100644 --- a/Moose Development/Moose/Utilities/Enums.lua +++ b/Moose Development/Moose/Utilities/Enums.lua @@ -131,14 +131,24 @@ ENUMS.WeaponFlag={ Cannons = 805306368, -- GUN_POD + BuiltInCannon --- Torpedo Torpedo = 4294967296, + --- Decoy + Decoys = 8589934592, + --- Shell + SmokeShell = 17179869184, + IlluminationShell = 34359738368, + MarkerShell = 51539607552, + MarkerWeapon = 51539620864, + SubmunitionDispenserShell = 68719476736, + ConventionalShell = 206963736576, --- -- Even More Genral - Auto = 3221225470, -- Any Weapon (AnyBomb + AnyRocket + AnyMissile + Cannons) - AutoDCS = 1073741822, -- Something if often see - AnyAG = 2956984318, -- Any Air-To-Ground Weapon - AnyAA = 264241152, -- Any Air-To-Air Weapon - AnyUnguided = 2952822768, -- Any Unguided Weapon - AnyGuided = 268402702, -- Any Guided Weapon + Auto = 265214230526, -- Any Weapon (AnyBomb + AnyRocket + AnyMissile + Cannons + Torpedos) + AutoDCS = 1073741822, -- Something if often see + AnyAG = 2956984318, -- Any Air-To-Ground Weapon + AnyAA = 264241152, -- Any Air-To-Air Weapon + AnyUnguided = 2952822768, -- Any Unguided Weapon + AnyGuided = 268402702, -- Any Guided Weapon + AnyShell = 258503344128, -- Any Shell } --- Weapon types by category. See the [Weapon Flag](https://wiki.hoggitworld.com/view/DCS_enum_weapon_flag) enumerator on hoggit wiki. @@ -220,11 +230,11 @@ ENUMS.WeaponType.Torpedo={ } ENUMS.WeaponType.Any={ -- General combinations - Weapon = 3221225470, -- Any Weapon (AnyBomb + AnyRocket + AnyMissile + Cannons) - AG = 2956984318, -- Any Air-To-Ground Weapon - AA = 264241152, -- Any Air-To-Air Weapon - Unguided = 2952822768, -- Any Unguided Weapon - Guided = 268402702, -- Any Guided Weapon + Weapon = 265214230526, -- Any Weapon (AnyBomb + AnyRocket + AnyMissile + Cannons + Torpedos) + AG = 2956984318, -- Any Air-To-Ground Weapon + AA = 264241152, -- Any Air-To-Air Weapon + Unguided = 2952822768, -- Any Unguided Weapon + Guided = 268402702, -- Any Guided Weapon }