forked from MTSR/mapserver
proper array concat
This commit is contained in:
parent
b8c7935e38
commit
a91c500e94
@ -58,8 +58,9 @@ function send_stats()
|
||||
wagons = {}
|
||||
}
|
||||
|
||||
for _, wagon in pairs(advtrains.wagons) do
|
||||
if wagon.train_id == train.id then
|
||||
for _, part in pairs(train.trainparts) do
|
||||
local wagon = advtrains.wagons[part]
|
||||
if wagon ~= nil then
|
||||
table.insert(t.wagons, {
|
||||
id = wagon.id,
|
||||
type = wagon.type,
|
||||
|
Loading…
Reference in New Issue
Block a user