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

master
orwell96 2020-07-23 19:28:46 +02:00
parent 8c66f1caf4
commit 3c9215f037
1 changed files with 10 additions and 0 deletions

View File

@ -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 = {}