~gpcf/advtrains-devel

[LuaATC] Fix get_fc concat when fc = nil v1 PROPOSED

Maverick2797: 1
 [LuaATC] Fix get_fc concat when fc = nil

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~gpcf/advtrains-devel/patches/55700/mbox | git am -3
Learn more about email & git

[PATCH] [LuaATC] Fix get_fc concat when fc = nil Export this patch

---
 advtrains_luaautomation/atc_rail.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index b98648e..ed43552 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -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,
-- 
2.46.0