mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
CTLD - small extra nil check in _GetUnitCargoMass(Unit
This commit is contained in:
parent
b0c2bad1d8
commit
f3d0d55a2f
@ -2263,6 +2263,7 @@ end
|
||||
-- @return #number mass in kgs
|
||||
function CTLD:_GetUnitCargoMass(Unit)
|
||||
self:T(self.lid .. " _GetUnitCargoMass")
|
||||
if not Unit then return 0 end
|
||||
local unitname = Unit:GetName()
|
||||
local loadedcargo = self.Loaded_Cargo[unitname] or {} -- #CTLD.LoadedCargo
|
||||
local loadedmass = 0 -- #number
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user