Fix get_fc concat when fc = nil

This commit is contained in:
Maverick2797 2024-10-30 19:02:19 +08:00 committed by orwell
parent d83d06ecdd
commit 322fc31e74
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ function r.fire_event(pos, evtdata, appr_internal)
if not train_id then return end
local fc_list = {}
for index,wagon_id in ipairs(train.trainparts) do
fc_list[index] = table.concat(advtrains.wagons[wagon_id].fc,"!") or ""
fc_list[index] = table.concat(advtrains.wagons[wagon_id].fc or {},"!")
end
return fc_list
end,