diff --git a/Moose Development/Moose/Cargo/Cargo.lua b/Moose Development/Moose/Cargo/Cargo.lua index 6a06e52f6..6051c25e4 100644 --- a/Moose Development/Moose/Cargo/Cargo.lua +++ b/Moose Development/Moose/Cargo/Cargo.lua @@ -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 diff --git a/Moose Development/Moose/Cargo/CargoGroup.lua b/Moose Development/Moose/Cargo/CargoGroup.lua index b64d205c2..8b1d0c54c 100644 --- a/Moose Development/Moose/Cargo/CargoGroup.lua +++ b/Moose Development/Moose/Cargo/CargoGroup.lua @@ -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 } )