diff --git a/Moose Development/Moose/Ops/OpsGroup.lua b/Moose Development/Moose/Ops/OpsGroup.lua index a650e0298..a42ef2463 100644 --- a/Moose Development/Moose/Ops/OpsGroup.lua +++ b/Moose Development/Moose/Ops/OpsGroup.lua @@ -2274,21 +2274,26 @@ end -- @param #OPSGROUP self -- @param #number Delay Delay in seconds. Default now. -- @param #number ExplosionPower (Optional) Explosion power in kg TNT. Default 100 kg. +-- @param #string ElementName Name of the element that should be destroyed. Default is all elements. -- @return #OPSGROUP self -function OPSGROUP:SelfDestruction(Delay, ExplosionPower) +function OPSGROUP:SelfDestruction(Delay, ExplosionPower, ElementName) if Delay and Delay>0 then - self:ScheduleOnce(Delay, OPSGROUP.SelfDestruction, self, 0, ExplosionPower) + self:ScheduleOnce(Delay, OPSGROUP.SelfDestruction, self, 0, ExplosionPower, ElementName) else -- Loop over all elements. for i,_element in pairs(self.elements) do local element=_element --#OPSGROUP.Element + + if ElementName==nil or ElementName==element.name then - local unit=element.unit - - if unit and unit:IsAlive() then - unit:Explode(ExplosionPower or 100) + local unit=element.unit + + if unit and unit:IsAlive() then + unit:Explode(ExplosionPower or 100) + end + end end end diff --git a/Moose Development/Moose/Ops/OpsTransport.lua b/Moose Development/Moose/Ops/OpsTransport.lua index 69e53d611..d59f981f2 100644 --- a/Moose Development/Moose/Ops/OpsTransport.lua +++ b/Moose Development/Moose/Ops/OpsTransport.lua @@ -606,12 +606,12 @@ end -- For weapons and equipment, the weight per item has to be specified explicitly as these cannot be retrieved by the DCS API. For liquids the -- default value of 1 kg per item should be used as the amount of liquid is already given in kg. -- @param #OPSTRANSPORT self --- @param Wrapper.Storage#STORAGE StorageFrom Storage from. --- @param Wrapper.Storage#STORAGE StorageTo Storage to. --- @param #string CargoType Type of cargo. +-- @param Wrapper.Storage#STORAGE StorageFrom Storage warehouse from which the cargo is taken. +-- @param Wrapper.Storage#STORAGE StorageTo Storage warehouse to which the cargo is delivered. +-- @param #string CargoType Type of cargo, *e.g.* `"weapons.bombs.Mk_84"` or liquid type as #number. -- @param #number CargoAmount Amount of cargo. Liquids in kg. -- @param #number CargoWeight Weight of a single cargo item in kg. Default 1 kg. --- @param #OPSTRANSPORT.TransportZoneCombo TransportZoneCombo Transport zone combo. +-- @param #OPSTRANSPORT.TransportZoneCombo TransportZoneCombo Transport zone combo if other than default. -- @return #OPSTRANSPORT self function OPSTRANSPORT:AddCargoStorage(StorageFrom, StorageTo, CargoType, CargoAmount, CargoWeight, TransportZoneCombo)