From 2d8c13885aa33a0f5eb43b16a1131f187fad75e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Sun, 11 Aug 2019 20:16:11 +0200 Subject: Shunting mode now couples trains on collision. Trains now get coupled when one of them is in coupling mode. --- advtrains_luaautomation/atc_rail.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'advtrains_luaautomation') 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 -- cgit v1.2.3