diff options
author | orwell96 <orwell@bleipb.de> | 2021-03-02 19:51:56 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-03-02 19:51:56 +0100 |
commit | 6135f8a23b4f507870dab481f4db466e6be0ac7d (patch) | |
tree | 29ea2d7912bba4e08c0dcc1c6da85712b45a2962 /advtrains_luaautomation/atc_rail.lua | |
parent | db9e4429d789b5217a969de34ecd429c385c380b (diff) | |
download | advtrains-6135f8a23b4f507870dab481f4db466e6be0ac7d.tar.gz advtrains-6135f8a23b4f507870dab481f4db466e6be0ac7d.tar.bz2 advtrains-6135f8a23b4f507870dab481f4db466e6be0ac7d.zip |
LuaATC: add sending atc command to train by ID, and getters for in/out text (solves #124 and #166)
Diffstat (limited to 'advtrains_luaautomation/atc_rail.lua')
-rw-r--r-- | advtrains_luaautomation/atc_rail.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua index 0dee0a5..2d6efe5 100644 --- a/advtrains_luaautomation/atc_rail.lua +++ b/advtrains_luaautomation/atc_rail.lua @@ -151,6 +151,14 @@ function r.fire_event(pos, evtdata, appr_internal) advtrains.trains[train_id].text_inside=text return true end, + atc_get_text_outside = function() + if not train_id then return false end + return advtrains.trains[train_id].text_outside + end, + atc_get_text_inside = function(text) + if not train_id then return false end + return advtrains.trains[train_id].text_inside + end, atc_set_lzb_tsr = function(speed) if not appr_internal then error("atc_set_lzb_tsr() can only be used during 'approach' events!") |