#CTLD docu

This commit is contained in:
Applevangelist 2025-02-09 12:24:16 +01:00
parent 9487a5ae91
commit 1d08bcf2e0

View File

@ -24,7 +24,7 @@
-- @module Ops.CTLD -- @module Ops.CTLD
-- @image OPS_CTLD.jpg -- @image OPS_CTLD.jpg
-- Last Update Jan 2025 -- Last Update Feb 2025
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -1388,7 +1388,7 @@ CTLD.UnitTypeCapabilities = {
--- CTLD class version. --- CTLD class version.
-- @field #string version -- @field #string version
CTLD.version="1.1.29" CTLD.version="1.1.30"
--- Instantiate a new CTLD. --- Instantiate a new CTLD.
-- @param #CTLD self -- @param #CTLD self
@ -3202,6 +3202,9 @@ function CTLD:_LoadCratesNearby(Group, Unit)
end end
--- (Internal) Function to clean up tracked cargo crates --- (Internal) Function to clean up tracked cargo crates
-- @param #CTLD self
-- @param #list crateIdsToRemove Table of IDs
-- @return self
function CTLD:_CleanupTrackedCrates(crateIdsToRemove) function CTLD:_CleanupTrackedCrates(crateIdsToRemove)
local existingcrates = self.Spawned_Cargo -- #table local existingcrates = self.Spawned_Cargo -- #table
local newexcrates = {} local newexcrates = {}
@ -3855,7 +3858,6 @@ end
-- @param #CTLD self -- @param #CTLD self
-- @param Wrapper.Group#GROUP Group -- @param Wrapper.Group#GROUP Group
-- @param Wrapper.Unit#UNIT Unit -- @param Wrapper.Unit#UNIT Unit
function CTLD:_PackCratesNearby(Group, Unit) function CTLD:_PackCratesNearby(Group, Unit)
self:T(self.lid .. " _PackCratesNearby") self:T(self.lid .. " _PackCratesNearby")
----------------------------------------- -----------------------------------------
@ -4338,6 +4340,12 @@ function CTLD:_RefreshF10Menus()
return self return self
end end
--- (Internal) Function to unload a single crate
-- @param #CTLD self
-- @param Wrapper.Group#GROUP Group The calling group.
-- @param Wrapper.Unit#UNIT Unit The calling unit.
-- @param #string CrateName The name of the crate to unload
-- @return #CTLD self
function CTLD:_UnloadSingleCrate(Group, Unit, CrateName) function CTLD:_UnloadSingleCrate(Group, Unit, CrateName)
if not self.dropcratesanywhere then if not self.dropcratesanywhere then
local inzone, zoneName, zone, distance = self:IsUnitInZone(Unit, CTLD.CargoZoneType.DROP) local inzone, zoneName, zone, distance = self:IsUnitInZone(Unit, CTLD.CargoZoneType.DROP)
@ -4426,6 +4434,11 @@ function CTLD:_UnloadSingleCrate(Group, Unit, CrateName)
return self return self
end end
--- (Internal) Function to refresh the menu for a single unit after crates dropped.
-- @param #CTLD self
-- @param Wrapper.Group#GROUP Group The calling group.
-- @param Wrapper.Unit#UNIT Unit The calling unit.
-- @return #CTLD self
function CTLD:_RefreshDropCratesMenu(Group, Unit) function CTLD:_RefreshDropCratesMenu(Group, Unit)
local theGroup = Group local theGroup = Group
local theUnit = Unit local theUnit = Unit
@ -4459,6 +4472,12 @@ end
end end
end end
--- (Internal) Function to unload a single Troop group by ID.
-- @param #CTLD self
-- @param Wrapper.Group#GROUP Group The calling group.
-- @param Wrapper.Unit#UNIT Unit The calling unit.
-- @param #number cargoId the Cargo ID
-- @return #CTLD self
function CTLD:_UnloadSingleTroopByID(Group, Unit, cargoID) function CTLD:_UnloadSingleTroopByID(Group, Unit, cargoID)
self:T(self.lid .. " _UnloadSingleTroopByID for cargo ID " .. tostring(cargoID)) self:T(self.lid .. " _UnloadSingleTroopByID for cargo ID " .. tostring(cargoID))
@ -4653,9 +4672,11 @@ function CTLD:_UnloadSingleTroopByID(Group, Unit, cargoID)
return self return self
end end
--- (Internal) Function to refresh menu for troops on drop for a specific unit
-- @param #CTLD self
-------------------- -- @param Wrapper.Group#GROUP Group The requesting group.
-- @param Wrapper.Unit#UNIT Unit The requesting unit.
-- @return #CTLD self
function CTLD:_RefreshDropTroopsMenu(Group, Unit) function CTLD:_RefreshDropTroopsMenu(Group, Unit)
local theGroup=Group local theGroup=Group
local theUnit=Unit local theUnit=Unit
@ -4681,10 +4702,9 @@ function CTLD:_RefreshDropTroopsMenu(Group, Unit)
end end
end end
end end
return self
end end
--- [Internal] Function to check if a template exists in the mission. --- [Internal] Function to check if a template exists in the mission.
-- @param #CTLD self -- @param #CTLD self
-- @param #table temptable Table of string names -- @param #table temptable Table of string names