From 556984940124c671c617fce1e81433dae39184f3 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Mon, 15 Feb 2021 16:52:54 +0100 Subject: Restore LuaATC autocouple interface accidentally lost in 74a2199 During rebase, this part of the autocouple feature must have been accidentally lost --- advtrains_luaautomation/atc_rail.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- cgit v1.2.3