This commit is contained in:
Frank 2020-12-21 22:52:51 +01:00
parent fed1fb2839
commit 4869ae4baa
2 changed files with 11 additions and 4 deletions

View File

@ -1066,18 +1066,23 @@ do -- CARGO_REPRESENTABLE
--- CARGO_REPRESENTABLE Constructor.
-- @param #CARGO_REPRESENTABLE self
-- @param #string Type
-- @param #string Name
-- @param #number LoadRadius (optional)
-- @param #number NearRadius (optional)
-- @param Wrapper.Positionable#POSITIONABLE CargoObject The cargo object.
-- @param #string Type Type name
-- @param #string Name Name.
-- @param #number LoadRadius (optional) Radius in meters.
-- @param #number NearRadius (optional) Radius in meters when the cargo is loaded into the carrier.
-- @return #CARGO_REPRESENTABLE
function CARGO_REPRESENTABLE:New( CargoObject, Type, Name, LoadRadius, NearRadius )
-- Inherit CARGO.
local self = BASE:Inherit( self, CARGO:New( Type, Name, 0, LoadRadius, NearRadius ) ) -- #CARGO_REPRESENTABLE
self:F( { Type, Name, LoadRadius, NearRadius } )
local Desc = CargoObject:GetDesc()
self:I( { Desc = Desc } )
local Weight = math.random( 80, 120 )
if Desc then
if Desc.typeName == "2B11 mortar" then
Weight = 210

View File

@ -56,6 +56,8 @@ do -- CARGO_GROUP
-- @param #number NearRadius (optional) Once the units are within this radius of the carrier, they are actually loaded, i.e. disappear from the scene.
-- @return #CARGO_GROUP Cargo group object.
function CARGO_GROUP:New( CargoGroup, Type, Name, LoadRadius, NearRadius )
-- Inherit CAROG_REPORTABLE
local self = BASE:Inherit( self, CARGO_REPORTABLE:New( Type, Name, 0, LoadRadius, NearRadius ) ) -- #CARGO_GROUP
self:F( { Type, Name, LoadRadius } )