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.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index 6a3959c..04228ac 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -63,6 +63,16 @@ function r.fire_event(pos, evtdata)
get_line = function()
return train.line
end,
+ set_rc = function(rc)
+ if type(rc)~="string"then
+ return false
+ end
+ train.routingcode = rc
+ return true
+ end,
+ get_rc = function()
+ return train.routingcode
+ end,
atc_reset = function(cmd)
if not train_id then return false end
assertt(cmd, "string")