From 3c9215f037b90bd7e9e802930872827354b12711 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 23 Jul 2020 19:28:46 +0200 Subject: DISCARD ON MERGE!: Temporary compatibility fix: translate signal aspects back to old format if they are in the new format, to allow reverting from new_lzb --- advtrains_interlocking/signal_api.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'advtrains_interlocking') diff --git a/advtrains_interlocking/signal_api.lua b/advtrains_interlocking/signal_api.lua index 90bfaf4..9729195 100644 --- a/advtrains_interlocking/signal_api.lua +++ b/advtrains_interlocking/signal_api.lua @@ -175,6 +175,11 @@ local function fillout_aspect(asp) asp.main = { free = true, } + elseif type(asp.main) ~= "table" then + asp.main = { + free = asp.main~=0, + speed = asp.main, + } end if not asp.dst then asp.dst = { @@ -186,6 +191,11 @@ local function fillout_aspect(asp) free = false, proceed_as_main = false, } + elseif type(asp.shunt) ~= "table" then + asp.shunt = { + free = asp.shunt, + proceed_as_main = asp.proceed_as_main, + } end if not asp.info then asp.info = {} -- cgit v1.2.3