aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/atc_rail.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-15 17:54:13 +0100
committerorwell96 <orwell@bleipb.de>2019-01-15 17:54:13 +0100
commitf5e8b702023535f23e20ca2493f19b406dada188 (patch)
tree02272156c82180d0f70595fbb7eb1082eb0cd523 /advtrains_luaautomation/atc_rail.lua
parenta3baead979b62ce0a5dcff36654d7de597cf6708 (diff)
downloadadvtrains-f5e8b702023535f23e20ca2493f19b406dada188.tar.gz
advtrains-f5e8b702023535f23e20ca2493f19b406dada188.tar.bz2
advtrains-f5e8b702023535f23e20ca2493f19b406dada188.zip
Add getter/setter for routingcode in LuaATC
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")