#CTLD - small fix for LoadesGroupsTable inserts

This commit is contained in:
Applevangelist 2025-01-25 15:54:29 +01:00
parent 1b4033cfce
commit 66a1fa8af5

View File

@ -5640,7 +5640,8 @@ end
BASE:ScheduleOnce(0.5,PostSpawn,{self.DroppedTroops[self.TroopCounter],Structure})
end
if self.keeploadtables and TimeStamp then
if self.keeploadtable and TimeStamp ~= nil then
self:T2("Inserting: "..cargo.CargoType)
local cargotype = cargo.CargoType
table.insert(self.LoadedGroupsTable,{Group=self.DroppedTroops[self.TroopCounter], TimeStamp=TimeStamp, CargoType=cargotype})
end
@ -5787,7 +5788,8 @@ end
BASE:ScheduleOnce(0.5,PostSpawn,{self.DroppedTroops[self.TroopCounter],Structure})
end
if self.keeploadtables and TimeStamp then
if self.keeploadtable and TimeStamp ~= nil then
self:T2("Inserting: "..cargo.CargoType)
local cargotype = cargo.CargoType
table.insert(self.LoadedGroupsTable,{Group=self.DroppedTroops[self.TroopCounter], TimeStamp=TimeStamp, CargoType=cargotype})
end
@ -6446,7 +6448,8 @@ end
local StaticType = dataset[12]
local StaticShape = dataset[13]
n=n+1
local timestamp = tonumber(dataset[14]) or timer.getTime()+n
local timestamp = tonumber(dataset[14]) or (timer.getTime()+n)
self:T2("TimeStamp = "..timestamp)
if type(groupname) == "string" and groupname ~= "STATIC" then
cargotemplates = string.gsub(cargotemplates,"{","")
cargotemplates = string.gsub(cargotemplates,"}","")