Some stuff

This commit is contained in:
Frank
2021-01-02 23:53:36 +01:00
parent 417af6a93c
commit 3358f98bc4
5 changed files with 119 additions and 40 deletions

View File

@@ -1078,11 +1078,14 @@ do -- CARGO_REPRESENTABLE
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 } )
-- Descriptors.
local Desc=CargoObject:GetDesc()
self:T({Desc=Desc})
-- Weight.
local Weight = math.random( 80, 120 )
-- Adjust weight..
if Desc then
if Desc.typeName == "2B11 mortar" then
Weight = 210
@@ -1091,13 +1094,8 @@ do -- CARGO_REPRESENTABLE
end
end
-- Set weight.
self:SetWeight( Weight )
-- local Box = CargoUnit:GetBoundingBox()
-- local VolumeUnit = ( Box.max.x - Box.min.x ) * ( Box.max.y - Box.min.y ) * ( Box.max.z - Box.min.z )
-- self:I( { VolumeUnit = VolumeUnit, WeightUnit = WeightUnit } )
--self:SetVolume( VolumeUnit )
return self
end