diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2019-08-11 20:16:11 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2019-08-11 20:16:11 +0200 |
commit | 2d8c13885aa33a0f5eb43b16a1131f187fad75e7 (patch) | |
tree | 8bddf1888edfa105c613ba38a70aea05c4aa8334 /advtrains_luaautomation/atc_rail.lua | |
parent | ef50610f675c85cb0c85eb200018896cefd0cc11 (diff) | |
download | advtrains-2d8c13885aa33a0f5eb43b16a1131f187fad75e7.tar.gz advtrains-2d8c13885aa33a0f5eb43b16a1131f187fad75e7.tar.bz2 advtrains-2d8c13885aa33a0f5eb43b16a1131f187fad75e7.zip |
Shunting mode now couples trains on collision.
Trains now get coupled when one of them is in coupling mode.
Diffstat (limited to 'advtrains_luaautomation/atc_rail.lua')
-rw-r--r-- | advtrains_luaautomation/atc_rail.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua index 89cd2c1..1d94a2b 100644 --- a/advtrains_luaautomation/atc_rail.lua +++ b/advtrains_luaautomation/atc_rail.lua @@ -66,6 +66,11 @@ function r.fire_event(pos, evtdata) end return false end, + set_shunt = function() + -- enable shunting mode + if not train_id then return false end + train.is_shunt = true + end, set_line = function(line) if type(line)~="string" and type(line)~="number" then return false |