aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-02-15 16:52:54 +0100
committerorwell96 <orwell@bleipb.de>2021-02-15 16:52:54 +0100
commit556984940124c671c617fce1e81433dae39184f3 (patch)
treedc74c8dc71902bc3eb50aab8147b7c534db082ed
parent737eb4987f30a48bebf0ac4a78b0c62e73a813e4 (diff)
downloadadvtrains-556984940124c671c617fce1e81433dae39184f3.tar.gz
advtrains-556984940124c671c617fce1e81433dae39184f3.tar.bz2
advtrains-556984940124c671c617fce1e81433dae39184f3.zip
Restore LuaATC autocouple interface accidentally lost in 74a2199
During rebase, this part of the autocouple feature must have been accidentally lost
-rw-r--r--advtrains_luaautomation/atc_rail.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index f1a8385..0dee0a5 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -96,6 +96,18 @@ function r.fire_event(pos, evtdata, appr_internal)
if not train_id then return false end
train.is_shunt = true
end,
+ unset_shunt = function()
+ if not train_id then return false end
+ train.is_shunt = nil
+ end,
+ set_autocouple = function ()
+ if not train_id then return false end
+ train.autocouple = true
+ end,
+ unset_autocouple = function ()
+ if not train_id then return false end
+ train.autocouple = nil
+ end,
set_line = function(line)
if type(line)~="string" and type(line)~="number" then
return false