mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
aa064a1d0e
@ -1278,6 +1278,12 @@ CTLD.RadioModulation = {
|
|||||||
FM = 1,
|
FM = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--- Loaded Cargo
|
||||||
|
-- @type CTLD.LoadedCargo
|
||||||
|
-- @field #number Troopsloaded
|
||||||
|
-- @field #number Cratesloaded
|
||||||
|
-- @field #table Cargo Table of #CTLD_CARGO objects
|
||||||
|
|
||||||
--- Zone Info.
|
--- Zone Info.
|
||||||
-- @type CTLD.CargoZone
|
-- @type CTLD.CargoZone
|
||||||
-- @field #string name Name of Zone.
|
-- @field #string name Name of Zone.
|
||||||
@ -1345,7 +1351,7 @@ CTLD.UnitTypeCapabilities = {
|
|||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CTLD.version="1.1.19"
|
CTLD.version="1.1.20"
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@ -5383,6 +5389,27 @@ end
|
|||||||
return Stock
|
return Stock
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- User - Query the cargo loaded from a specific unit
|
||||||
|
-- @param #CTLD self
|
||||||
|
-- @param Wrapper.Unit#UNIT Unit The (client) unit to query.
|
||||||
|
-- @return #number Troopsloaded
|
||||||
|
-- @return #number Cratesloaded
|
||||||
|
-- @return #table Cargo Table of #CTLD_CARGO objects
|
||||||
|
function CTLD:GetLoadedCargo(Unit)
|
||||||
|
local Troops = 0
|
||||||
|
local Crates = 0
|
||||||
|
local Cargo = {}
|
||||||
|
if Unit and Unit:IsAlive() then
|
||||||
|
local name = Unit:GetName()
|
||||||
|
if self.Loaded_Cargo[name] then
|
||||||
|
Troops = self.Loaded_Cargo[name].Troopsloaded or 0
|
||||||
|
Crates = self.Loaded_Cargo[name].Cratesloaded or 0
|
||||||
|
Cargo = self.Loaded_Cargo[name].Cargo or {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return Troops, Crates, Cargo
|
||||||
|
end
|
||||||
|
|
||||||
--- User - function to get a table of statics cargo in stock
|
--- User - function to get a table of statics cargo in stock
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
-- @return #table Table Table of Stock, indexed by cargo type name
|
-- @return #table Table Table of Stock, indexed by cargo type name
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user