aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/atc_rail.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_luaautomation/atc_rail.lua')
-rw-r--r--advtrains_luaautomation/atc_rail.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index 177fa78..dd26f51 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -99,6 +99,14 @@ function r.fire_event(pos, evtdata, appr_internal)
end
return fc_list
end,
+ get_fc_index = function()
+ if not train_id then return end
+ local fc_index_list = {}
+ for widx, wagon_id in ipars(train.trainparts) do
+ fc_index_list[widx] = advtrains.wagons[wagon_id].fcind or 1
+ end
+ return fc_index_list
+ end,
set_fc = function(fc_list,reset_index)
assertt(fc_list, "table")
if not train_id then return false end