summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:53:32 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:53:32 +0200
commit7d055e128ef6980b4083a08667419e0d54a29ac7 (patch)
tree9a5f7120083463650dd15f8af3576d57ecc897da
parent71b1c2c77a9f8ed10e8bb9bedab638f1b3bc47af (diff)
downloadluaatc_envs-7d055e128ef6980b4083a08667419e0d54a29ac7.tar.gz
luaatc_envs-7d055e128ef6980b4083a08667419e0d54a29ac7.tar.bz2
luaatc_envs-7d055e128ef6980b4083a08667419e0d54a29ac7.zip
State at 2021-07-08
-rw-r--r--Crossroads/init_code.lua14
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