diff options
-rw-r--r-- | Crossroads/init_code.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Crossroads/init_code.lua b/Crossroads/init_code.lua index 6923d61..02fe6b6 100644 --- a/Crossroads/init_code.lua +++ b/Crossroads/init_code.lua @@ -155,9 +155,9 @@ function F.stn2gen(stn, trk, door, ret, chout) local offset = t[i][7] local arroff if interval and offset then - arroff = timenow%interval + arroff = timenow%(F.lines[l].rtt or interval) interval = (offset-timenow)%interval - interval = math.max(10, math.min(45, interval)) + interval = math.max(5, math.min(45, interval)) else interval = 15 end @@ -401,17 +401,19 @@ F.lines = { }, } -for k, v in pairs{["B"] = {6, 5, 3},} do - local t = {{"crc_1_"..v[1], "E"}} +for k, v in pairs{["B"] = {6, 5, 3, 20},} do + local t = {{"crc_1_"..v[1], "E", v[4]}} for i = 5, 8 do - t[#t+1] = {string.format("crs_%d_%d", i, v[2]),"S"} + t[#t+1] = {string.format("crs_%d_%d", i, v[2]),"S", v[4] + 45 + (i-5)*30} end for i = 8, 5, -1 do - t[#t+1] = {string.format("crs_%d_%d", i, v[3]),"N"} + t[#t+1] = {string.format("crs_%d_%d", i, v[3]),"N", v[4] + 175 + (8-i)*30} end F.lines["CRT1"..k] = { name = "CRT 1"..k, ring = "clockwise", + rtt = 320, + interval = 80, [1] = t } end |