aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/atc_rail.lua
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-06-08 13:42:24 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-06-08 13:42:24 +0200
commit15be5006627f7ff1b81dc376ebf12ea7a0a7f86a (patch)
tree9388d2ce93a29d01fadeca5d9a51c49b4bb4c87a /advtrains_luaautomation/atc_rail.lua
parent943e5208a99a1144c0568c2ab47214acca0c4c58 (diff)
downloadadvtrains-15be5006627f7ff1b81dc376ebf12ea7a0a7f86a.tar.gz
advtrains-15be5006627f7ff1b81dc376ebf12ea7a0a7f86a.tar.bz2
advtrains-15be5006627f7ff1b81dc376ebf12ea7a0a7f86a.zip
document shunting mode, add unset_shunt to luaatc
Diffstat (limited to 'advtrains_luaautomation/atc_rail.lua')
-rw-r--r--advtrains_luaautomation/atc_rail.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index 1d94a2b..feac8d1 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -71,6 +71,10 @@ function r.fire_event(pos, evtdata)
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_line = function(line)
if type(line)~="string" and type(line)~="number" then
return false