This commit is contained in:
Frank
2022-12-20 23:51:18 +01:00
parent 0adca414ce
commit 30e6542887
9 changed files with 1311 additions and 342 deletions

View File

@@ -176,7 +176,11 @@ function COHORT:New(TemplateGroupName, Ngroups, CohortName)
for i,_unit in pairs(units) do
local unit=_unit --Wrapper.Unit#UNIT
local desc=unit:GetDesc()
self.weightAsset=self.weightAsset + (desc.massMax or 666)
local mass=666
if desc then
mass=desc.massMax or desc.massEmpty
end
self.weightAsset=self.weightAsset + (mass or 666)
if i==1 then
self.cargobayLimit=unit:GetCargoBayFreeWeight()
end