summaryrefslogtreecommitdiff
path: root/Crossroads
diff options
context:
space:
mode:
Diffstat (limited to 'Crossroads')
-rw-r--r--Crossroads/init_code.lua159
-rw-r--r--Crossroads/nodes/(1100,16,1950).lua1
-rw-r--r--Crossroads/nodes/(1100,20,1945).lua3
-rw-r--r--Crossroads/nodes/(1116,12,2621).lua4
-rw-r--r--Crossroads/nodes/(1116,12,2653).lua4
-rw-r--r--Crossroads/nodes/(1116,23,3014).lua3
-rw-r--r--Crossroads/nodes/(1116,23,3027).lua3
-rw-r--r--Crossroads/nodes/(1117,16,1977).lua1
-rw-r--r--Crossroads/nodes/(1117,20,1951).lua3
-rw-r--r--Crossroads/nodes/(1119,16,2757).lua1
-rw-r--r--Crossroads/nodes/(1119,19,3018).lua1
-rw-r--r--Crossroads/nodes/(1122,16,2771).lua1
-rw-r--r--Crossroads/nodes/(1171,5,846).lua1
-rw-r--r--Crossroads/nodes/(1179,5,863).lua1
-rw-r--r--Crossroads/nodes/(1187,-2,987).lua3
-rw-r--r--Crossroads/nodes/(1187,-6,989).lua1
-rw-r--r--Crossroads/nodes/(1190,-2,987).lua3
-rw-r--r--Crossroads/nodes/(1190,-6,989).lua1
-rw-r--r--Crossroads/nodes/(1198,-6,1006).lua1
-rw-r--r--Crossroads/nodes/(1201,-6,1006).lua1
-rw-r--r--Crossroads/nodes/(1223,12,1555).lua2
-rw-r--r--Crossroads/nodes/(1228,12,1541).lua2
-rw-r--r--Crossroads/nodes/(1702,5,906).lua6
-rw-r--r--Crossroads/nodes/(1755,27,943).lua17
-rw-r--r--Crossroads/nodes/(1760,5,1000).lua6
-rw-r--r--Crossroads/nodes/(1786,5,994).lua1
-rw-r--r--Crossroads/nodes/(1795,5,1000).lua6
-rw-r--r--Crossroads/nodes/(1801,5,1008).lua4
-rw-r--r--Crossroads/nodes/(2010,3,5938).lua1
-rw-r--r--Crossroads/nodes/(30671,-6,1142).lua1
30 files changed, 191 insertions, 51 deletions
diff --git a/Crossroads/init_code.lua b/Crossroads/init_code.lua
index ce984ab..dc8cf08 100644
--- a/Crossroads/init_code.lua
+++ b/Crossroads/init_code.lua
@@ -1,5 +1,13 @@
+F.foo = {}
+function F.foo2()
+ F.foo[1] = "foo"
+end
+
if S.trains == nil then S.trains = {} end
if not S.odsd then S.odsd = {} end
+if not S.cpoints then S.cpoints = {} end
+S.pd = {}
+S.pdt = {}
F.odj = {}
@@ -116,6 +124,7 @@ end
-- Second version of the station function
function F.stn2gen(stn, trk, door, ret, chout)
+ __approach_callback_mode = 1
if not stn then return end
if not trk then return end
if not door then return end
@@ -129,20 +138,38 @@ function F.stn2gen(stn, trk, door, ret, chout)
local l = get_line()
if (not l) or l==" " then return end
local rc = get_rc() or ""
- if rc:match("FREIGHT") then
+ if rc:match("FREIGHT") and atc_id then
atc_send (ret and "BBWRSM" or "SM")
return
end
- if event.type == "train" then
+ if event.type == "approach" then
+ for i = 1, #t, 1 do
+ if t[i][1]==l then
+ atc_set_lzb_tsr(2)
+ return
+ end
+ end
+ return
+ elseif event.type == "train" then
for i = 1, #t, 1 do
if t[i][1]==l then
stop = true
- atc_send(string.format("BBWO%sD15OCD1%sSM", door, (ret and "R" or "")))
+ local timenow = os.time()
+ local interval = F.lines[l].interval
+ local offset = t[i][7]
+ local arroff
+ if interval and offset then
+ arroff = timenow%interval
+ interval = (offset-timenow)%interval
+ interval = math.max(10, math.min(45, interval))
+ else
+ interval = 15
+ end
+ atc_send(string.format("A0B0WO%sD%dOCD1%sA1SM", door, interval, (ret and "R" or "")))
local intext_nxt = F.stnlist[t[i][2]] and ("Next station:\n%s\n(Track: %s)"):format(F.stnlist[t[i][2]], t[i][3] or "?") or ""
- local intext = ("%s\n%s"):format(F.stnlist[stn] or stn, intext_nxt)
+ local intext = ("%s\n%s\nDebug: %d %d"):format(F.stnlist[stn] or stn, intext_nxt, arroff or timenow, interval)
local outtext = string.format("%s (%06d)",F.lines[l].name or l, atc_id)
if t[i][4] then outtext = outtext.." - "..(F.stnlist[t[i][4]] or t[i][4]) end
- local timenow = os.time()
t[i][5] = t[i][5] or (timenow-(F.depint[l] or 300))
-- note that the "average" time is weighted
t[i][6] = t[i][6] and (t[i][6]+timenow-t[i][5]+30)/2 or (timenow-t[i][5])
@@ -155,19 +182,17 @@ function F.stn2gen(stn, trk, door, ret, chout)
s = stn,
t = (trk or "N/A"),
}
- schedule_in(15, intext_nxt)
+ schedule_in(interval)
break
end
end
if (not stop) then
atc_send(ret and "BBWRSM" or "SM")
end
- end
- if event.type == "schedule" then
- --[[if type(event.msg) == "string" then
- atc_set_text_inside(event.msg)
- atc_send(ret and "OCD1RSM" or "OCD1SM")
- end]]
+ elseif event.type == "schedule" then
+ if atc_id then
+ atc_send("OCD1"..(((not ret) == (not atc_arrow)) and "R" or "").."A1SM")
+ end
end
end
@@ -176,7 +201,11 @@ function F.disp2gen(stn)
if not F.stndet[stn] then return end
local s = F.stndet[stn]
local sn = F.stnlist[stn] or stn
- local d={{sn.."\nTrack Line\n", (string.sub(sn, 28, 54) or "").." \nDestination\n", " \nEstimated Arrival\n"}}
+ local d={{
+ {sn.."\nTrack Line"},
+ {(string.sub(sn, 28, 54) or "").." \nDestination"},
+ {" \nEstimated Arrival"}
+ }}
local c=2
local t={}
for i,_ in pairs(s) do t[#t+1]=i end
@@ -187,17 +216,59 @@ function F.disp2gen(stn)
for j = 1,#trk,1 do
local det = trk[j]
local r = (c%4==0) and (c/4+1) or ((c-c%4)/4+1)
- if not d[r] then d[r]={"",""} end
- d[r][1] = d[r][1] .. string.format("%-8s %s\n", tostring(trkname), F.lines[det[1]].name)
- d[r][2] = d[r][2] .. (F.lines[det[1]].ring and "Ring Line" or (F.stnlist[det[4]] or det[4] or "")).."\n"
+ if not d[r] then d[r]={{},{},{}} end
+ d[r][1][#d[r][1]+1] = string.format("%-8s %s", tostring(trkname), F.lines[det[1]].name)
+ d[r][2][#d[r][2]+1] = (F.lines[det[1]].ring and "Ring Line" or (F.stnlist[det[4]] or det[4] or ""))
c=c+1
local earr = (det[5] or os.time())+(det[6] or F.depint[det[1]] or 600)
- d[r][3] = d[r][3] .. os.date("%Y-%m-%d %H:%M %Z", earr) .. "\n"
+ d[r][3][#d[r][3]+1] = os.date("%Y-%m-%d %H:%M %Z", earr)
end
end
for i = 1, #d, 1 do
- for j = 1, #d[1], 1 do
- digiline_send("d_"..tostring(i).."_"..tostring(j), d[i][j])
+ for j = 1, #d[i], 1 do
+ digiline_send("d_"..tostring(i).."_"..tostring(j), table.concat(d[i][j],"\n"))
+ end
+ end
+end
+
+--function F.disp2gen() end
+
+function F.pdisp(stn, trk, dn)
+ if not (stn and trk and dn) then return end
+ if not F.stndet[stn] or not F.stndet[stn][trk] then return end
+ if not S.pd[stn] then S.pd[stn] = { [trk] = {[dn] = 0} } end
+ if not S.pd[stn][trk] then S.pd[stn][trk] = {[dn] = 0} end
+ if not S.pd[stn][trk][dn] then S.pd[stn][trk][dn] = 0 end
+ if not S.pdt[stn] then S.pdt[stn] = {} end
+ if not S.pdt[stn][trk] then
+ local t = {}
+ for i = 1, #F.stndet[stn][trk], 1 do
+ local v = F.stndet[stn][trk][i]
+ t[#t+1] = ("Track: %s\n%s\nTo: %s\nNext: %s"):format(
+ trk, F.lines[v[1]].name, F.stnlist[v[4] or "N/A"] or v[4] or "N/A",
+ F.stnlist[v[2] or "N/A"] or v[2] or "N/A")
+ end
+ S.pdt[stn][trk] = t
+ end
+ local n = S.pd[stn][trk][dn] + 1
+ local t = S.pdt[stn][trk]
+ digiline_send("track"..trk,t[n])
+ if n >= #t then n = 0 end
+ S.pd[stn][trk][dn] = n
+end
+
+function F.dirsign(stn, trk, ln, arrow)
+ if event.type == "init" or event.type == "punch" then
+ if not (stn and trk and ln and arrow) then return end
+ local t = F.stndet[stn]
+ if not t then return end
+ t = t[trk]
+ if not t then return end
+ for i = 1, #t, 1 do
+ if t[i][1] == ln then
+ digiline_send("lcd",("%s T. %s | %s | %s"):format(arrow, trk, F.lines[ln].name, F.stnlist[t[i][4]]))
+ break
+ end
end
end
end
@@ -234,6 +305,8 @@ function F.atc (cmd, intext, outtext)
end
F.stnlist = {
+ ["N/A"] = "N/A",
+ Bts = "Origin Berton St.",
cg = "Colored Grasses",
clockwise = "Clockwise Route",
counterclockwise = "Counterclockwise Route",
@@ -276,16 +349,25 @@ F.stnlist = {
F.lines = {
["AB"] = {
- name = "ATL Bronze Line",
+ name = "ATL-B Commuter", short = "ATL-B/C",
+ ring = false,
+ interval = 240,
+ [1] = { {"crch","A1"}, --[[ {"crwm","3"},]] {"scs","N1"}, {"scc","N1"}, {"scn","N1"}, {"cg","1"}, {"thecube","4"}, --[[{"phsc","N"},]] {"grsc", "4"}, {"phwest","2"} },
+ [2] = { {"phwest","2"}, {"grsc", "3"}, --[[{"phsc","S"},]] {"thecube","1"}, {"cg","2"}, {"scn","S1"}, {"scc","S1"}, {"scs","S1"}, --[[ {"crwm","4"}, ]] {"crch","A1"} },
+ },
+ ["ABE"] = {
+ name = "ATL-B Express", short = "ATL-B/E",
ring = false,
- [1] = { {"crch","A1"}, --[[ {"crwm","3"}, ]] {"scs","N2"}, {"scc","N2"}, {"scn","N2"}, {"cg","1"}, {"thecube","4"}, {"phsc","N"}, {"grsc", "4"}, {"phwest","1"} },
- [2] = { {"phwest","1"}, {"grsc", "3"}, {"phsc","S"}, {"thecube","1"}, {"cg","2"}, {"scn","S2"}, {"scc","S2"}, {"scs","S2"}, --[[ {"crwm","4"}, ]] {"crch","A1"} },
+ interval = 240,
+ [1] = {{"crch","A1"}, {"scc","N2"}, {"cg","1"}, {"thecube", "4"}, {"phwest", "2"}},
+ [2] = {{"phwest", "2"}, {"thecube", "1"}, {"cg", "2"}, {"scc", "S2"}, {"crch", "A1"}},
},
["AZ"] = {
- name = "ATL Zinc Line",
+ name = "ATL Zinc Line", short = "ATL-Z",
ring = false,
- [1] = { {"evo","N/A"}, {"scs","N1"}, {"scc","N1"}, {"scn","N1"}, {"oc","N"}, {"elgp","N"}, {"elsf","E"}, {"elchateau","S"} },
- [2] = { {"elchateau","S"}, {"elsf","W"}, {"elgp","S"}, {"oc","S"}, {"scn","S1"}, {"scc", "S1"}, {"scs","S1"}, {"evo","N/A"} },
+ interval = 480,
+ [1] = { {"Bts","3"}, {"evo","N/A"}, {"scs","N1"}, {"scc","N1"}, {"scn","N1"}, {"oc","N"}, {"elgp","N"}, {"elsf","E"}, {"elchateau","S"} },
+ [2] = { {"elchateau","S"}, {"elsf","W"}, {"elgp","S"}, {"oc","S"}, {"scn","S1"}, {"scc", "S1"}, {"scs","S1"}, {"evo","N/A"}, {"Bts","3"}, },
},
["CRT1"] = {
name = "CRT 1",
@@ -308,15 +390,17 @@ for i, l in pairs(F.lines) do
for k = 1, #dir, 1 do
local s = dir[k][1]
local t = dir[k][2]
+ local o = dir[k][3]
if not F.stndet[s] then F.stndet[s] = {} end
if not F.stndet[s][t] then F.stndet[s][t] = {} end
+ local det = F.stndet[s][t]
if k~=#dir or l.ring then
local nxt = dir[k==#dir and 1 or k+1]
- F.stndet[s][t][#F.stndet[s][t]+1] = {i, nxt[1], nxt[2], dir[#dir][1]}
+ det[#det+1] = {i, nxt[1], nxt[2], dir[#dir][1], nil, nil, o}
else
local addent = true
for m = 1, #l, 1 do addent = addent and (l[m][1]==dir[k]) end
- if addent then F.stndet[s][t][#F.stndet[s][t]+1] = {i, nil, nil, s} end
+ if addent then det[#det+1] = {i, nil, nil, s, nil, nil, o} end
end
end
end
@@ -385,4 +469,25 @@ end
function F.odc(ln, rc)
interrupt_pos(F.dpts[ln],{['rc']=rc})
+end
+
+function F.cpoint(name, int)
+ __approach_callback_mode = 1
+ local last = S.cpoints[name] or 0
+ local next = last+int
+ local now = os.time()
+ if event.type == "approach" then
+ if now < next then atc_set_lzb_tsr(2) end
+ elseif event.type == "train" and atc_arrow then
+ if now < next then
+ atc_send(string.format("A0B0WD%dA1SM", next-now))
+ schedule_in(next-now)
+ else
+ S.cpoints[name] = now
+ atc_send("A1SM")
+ end
+ elseif event.type == "schedule" and atc_arrow then
+ S.cpoints[name] = now
+ atc_send("A1SM")
+ end
end \ No newline at end of file
diff --git a/Crossroads/nodes/(1100,16,1950).lua b/Crossroads/nodes/(1100,16,1950).lua
new file mode 100644
index 0000000..194c3d9
--- /dev/null
+++ b/Crossroads/nodes/(1100,16,1950).lua
@@ -0,0 +1 @@
+F.stn2gen("thecube","1","L") \ No newline at end of file
diff --git a/Crossroads/nodes/(1100,20,1945).lua b/Crossroads/nodes/(1100,20,1945).lua
new file mode 100644
index 0000000..0cdeadc
--- /dev/null
+++ b/Crossroads/nodes/(1100,20,1945).lua
@@ -0,0 +1,3 @@
+if event.type == "digiline" and event.channel == "t1" then
+ F.pdisp("thecube","1","S")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1116,12,2621).lua b/Crossroads/nodes/(1116,12,2621).lua
index 3b6577d..1267653 100644
--- a/Crossroads/nodes/(1116,12,2621).lua
+++ b/Crossroads/nodes/(1116,12,2621).lua
@@ -1 +1,3 @@
-F.disp2gen("phsc") \ No newline at end of file
+if event.type == "digiline" and event.channel == "upd" then
+ F.disp2gen("phsc")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1116,12,2653).lua b/Crossroads/nodes/(1116,12,2653).lua
index 3b6577d..1267653 100644
--- a/Crossroads/nodes/(1116,12,2653).lua
+++ b/Crossroads/nodes/(1116,12,2653).lua
@@ -1 +1,3 @@
-F.disp2gen("phsc") \ No newline at end of file
+if event.type == "digiline" and event.channel == "upd" then
+ F.disp2gen("phsc")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1116,23,3014).lua b/Crossroads/nodes/(1116,23,3014).lua
new file mode 100644
index 0000000..44e9c85
--- /dev/null
+++ b/Crossroads/nodes/(1116,23,3014).lua
@@ -0,0 +1,3 @@
+if event.type == "digiline" and event.channel == "track2-update" then
+ F.pdisp("phwest","2","S")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1116,23,3027).lua b/Crossroads/nodes/(1116,23,3027).lua
new file mode 100644
index 0000000..4902e0c
--- /dev/null
+++ b/Crossroads/nodes/(1116,23,3027).lua
@@ -0,0 +1,3 @@
+if event.type == "digiline" and event.channel == "track2-update" then
+ F.pdisp("phwest","2","N")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1117,16,1977).lua b/Crossroads/nodes/(1117,16,1977).lua
new file mode 100644
index 0000000..29aeb3f
--- /dev/null
+++ b/Crossroads/nodes/(1117,16,1977).lua
@@ -0,0 +1 @@
+F.stn2gen("thecube","4","L") \ No newline at end of file
diff --git a/Crossroads/nodes/(1117,20,1951).lua b/Crossroads/nodes/(1117,20,1951).lua
new file mode 100644
index 0000000..a17606a
--- /dev/null
+++ b/Crossroads/nodes/(1117,20,1951).lua
@@ -0,0 +1,3 @@
+if event.type == "digiline" and event.channel == "t4" then
+ F.pdisp("thecube","4","S")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1119,16,2757).lua b/Crossroads/nodes/(1119,16,2757).lua
new file mode 100644
index 0000000..dde01ed
--- /dev/null
+++ b/Crossroads/nodes/(1119,16,2757).lua
@@ -0,0 +1 @@
+F.stn2gen("grsc", "3", "R") \ No newline at end of file
diff --git a/Crossroads/nodes/(1119,19,3018).lua b/Crossroads/nodes/(1119,19,3018).lua
new file mode 100644
index 0000000..51ef14b
--- /dev/null
+++ b/Crossroads/nodes/(1119,19,3018).lua
@@ -0,0 +1 @@
+F.stn2gen("phwest","2","L",true,true) \ No newline at end of file
diff --git a/Crossroads/nodes/(1122,16,2771).lua b/Crossroads/nodes/(1122,16,2771).lua
new file mode 100644
index 0000000..27a6f78
--- /dev/null
+++ b/Crossroads/nodes/(1122,16,2771).lua
@@ -0,0 +1 @@
+F.stn2gen("grsc", "4", "R") \ No newline at end of file
diff --git a/Crossroads/nodes/(1171,5,846).lua b/Crossroads/nodes/(1171,5,846).lua
new file mode 100644
index 0000000..354d229
--- /dev/null
+++ b/Crossroads/nodes/(1171,5,846).lua
@@ -0,0 +1 @@
+F.stn2gen("scs","S1","R") \ No newline at end of file
diff --git a/Crossroads/nodes/(1179,5,863).lua b/Crossroads/nodes/(1179,5,863).lua
new file mode 100644
index 0000000..61b92a5
--- /dev/null
+++ b/Crossroads/nodes/(1179,5,863).lua
@@ -0,0 +1 @@
+F.stn2gen("scs","N1","R") \ No newline at end of file
diff --git a/Crossroads/nodes/(1187,-2,987).lua b/Crossroads/nodes/(1187,-2,987).lua
new file mode 100644
index 0000000..d4e994b
--- /dev/null
+++ b/Crossroads/nodes/(1187,-2,987).lua
@@ -0,0 +1,3 @@
+if event.type == "digiline" and event.channel == "upd" then
+ F.pdisp("scc","S2","S")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1187,-6,989).lua b/Crossroads/nodes/(1187,-6,989).lua
new file mode 100644
index 0000000..5c86126
--- /dev/null
+++ b/Crossroads/nodes/(1187,-6,989).lua
@@ -0,0 +1 @@
+F.stn2gen("scc", "S2", "R") \ No newline at end of file
diff --git a/Crossroads/nodes/(1190,-2,987).lua b/Crossroads/nodes/(1190,-2,987).lua
new file mode 100644
index 0000000..3722041
--- /dev/null
+++ b/Crossroads/nodes/(1190,-2,987).lua
@@ -0,0 +1,3 @@
+if event.type == "digiline" and event.channel == "upd" then
+ F.pdisp("scc","S1","S")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1190,-6,989).lua b/Crossroads/nodes/(1190,-6,989).lua
new file mode 100644
index 0000000..3947016
--- /dev/null
+++ b/Crossroads/nodes/(1190,-6,989).lua
@@ -0,0 +1 @@
+F.stn2gen("scc", "S1", "L") \ No newline at end of file
diff --git a/Crossroads/nodes/(1198,-6,1006).lua b/Crossroads/nodes/(1198,-6,1006).lua
new file mode 100644
index 0000000..c0c450e
--- /dev/null
+++ b/Crossroads/nodes/(1198,-6,1006).lua
@@ -0,0 +1 @@
+F.stn2gen("scc", "N1", "L") \ No newline at end of file
diff --git a/Crossroads/nodes/(1201,-6,1006).lua b/Crossroads/nodes/(1201,-6,1006).lua
new file mode 100644
index 0000000..855f755
--- /dev/null
+++ b/Crossroads/nodes/(1201,-6,1006).lua
@@ -0,0 +1 @@
+F.stn2gen("scc", "N2", "R") \ No newline at end of file
diff --git a/Crossroads/nodes/(1223,12,1555).lua b/Crossroads/nodes/(1223,12,1555).lua
index b07a528..75d5eea 100644
--- a/Crossroads/nodes/(1223,12,1555).lua
+++ b/Crossroads/nodes/(1223,12,1555).lua
@@ -1,5 +1,5 @@
if event.type == "digiline" then
if event.channel == "updwrapper" then
- digiline_send("upd","update")
+ F.disp2gen("cg")
end
end \ No newline at end of file
diff --git a/Crossroads/nodes/(1228,12,1541).lua b/Crossroads/nodes/(1228,12,1541).lua
index b07a528..75d5eea 100644
--- a/Crossroads/nodes/(1228,12,1541).lua
+++ b/Crossroads/nodes/(1228,12,1541).lua
@@ -1,5 +1,5 @@
if event.type == "digiline" then
if event.channel == "updwrapper" then
- digiline_send("upd","update")
+ F.disp2gen("cg")
end
end \ No newline at end of file
diff --git a/Crossroads/nodes/(1702,5,906).lua b/Crossroads/nodes/(1702,5,906).lua
new file mode 100644
index 0000000..03259d6
--- /dev/null
+++ b/Crossroads/nodes/(1702,5,906).lua
@@ -0,0 +1,6 @@
+__approach_callback_mode = 1
+if event.type == "approach" then
+ atc_set_lzb_tsr(2)
+elseif event.type == "train" then
+ atc_send("B2")
+end \ No newline at end of file
diff --git a/Crossroads/nodes/(1755,27,943).lua b/Crossroads/nodes/(1755,27,943).lua
index d09f055..135d7ab 100644
--- a/Crossroads/nodes/(1755,27,943).lua
+++ b/Crossroads/nodes/(1755,27,943).lua
@@ -1,7 +1,8 @@
-local head = { "V TRAIN LINE STATION", " " }
+local head = { "V TRAIN LINE STATION ", " " }
local length = 18
if event.type=="digiline" or event.type=="punch" then
if event.channel=="upd_main" or event.type=="punch" then
+ local table = table
local start_t = os.clock()
if not S.lagrec then S.lagrec = {} end
local la = {}
@@ -14,16 +15,16 @@ if event.type=="digiline" or event.type=="punch" then
for id = 1, #ids, 1 do
local st = (S.trains[ids[id] or 0] or "")
i = (counter-counter%7)/7*2+((counter%7<3) and 1 or 2)
- if not la[i] then la[i] = (i%2==0) and "" or head[1] end
- if not lb[i] then lb[i] = (i%2==0) and "" or head[2] end
- local n = "[" .. (st.t or "N/A") .. "] " .. (F.stnlist[st.s] or st.s)
- la[i] = string.format ("%s\n%02d %06d %-7s %s", la[i], st.v, ids[id], st.l, n)
- lb[i] = lb[i] .. "\n" .. (n:len() < 10 and " " or n:sub(10))
+ if not la[i] then la[i] = (i%2==0) and {} or {head[1]} end
+ if not lb[i] then lb[i] = (i%2==0) and {} or {head[2]} end
+ local n = string.format("[%s] %s", st.t or "?", F.stnlist[st.s] or st.s)
+ la[i][#la[i]+1] = string.format("%02d %06d %-7s %s", st.v, ids[id], st.l, n)
+ lb[i][#lb[i]+1] = (n:len() < 10 and " " or n:sub(10))
counter = counter + 1
end
for i=1,#la,1 do
- digiline_send("d"..tostring(i).."a", la[i] or "")
- digiline_send("d"..tostring(i).."b", lb[i] or "")
+ digiline_send("d"..tostring(i).."a", table.concat(la[i] or {" "," "},"\n"))
+ digiline_send("d"..tostring(i).."b", table.concat(lb[i] or {" "," "},"\n"))
end
local end_t = os.clock()
S.lagrec[#S.lagrec+1] = end_t - start_t
diff --git a/Crossroads/nodes/(1760,5,1000).lua b/Crossroads/nodes/(1760,5,1000).lua
index ccb559e..7489acc 100644
--- a/Crossroads/nodes/(1760,5,1000).lua
+++ b/Crossroads/nodes/(1760,5,1000).lua
@@ -1,5 +1 @@
-if event.type=='train' then
- if atc_arrow then
- atc_set_text_outside('ATL Mithril Line - Ehlodex')
- end
-end \ No newline at end of file
+-- \ No newline at end of file
diff --git a/Crossroads/nodes/(1786,5,994).lua b/Crossroads/nodes/(1786,5,994).lua
new file mode 100644
index 0000000..e701f62
--- /dev/null
+++ b/Crossroads/nodes/(1786,5,994).lua
@@ -0,0 +1 @@
+F.stn2gen("crch", "A1", "R", true, true) \ No newline at end of file
diff --git a/Crossroads/nodes/(1795,5,1000).lua b/Crossroads/nodes/(1795,5,1000).lua
index d5beb66..7489acc 100644
--- a/Crossroads/nodes/(1795,5,1000).lua
+++ b/Crossroads/nodes/(1795,5,1000).lua
@@ -1,5 +1 @@
-if event.type == "train" then
- if atc_arrow then
- atc_set_text_inside("Next stop: CR-North Station St. 9th Alley")
- end
-end \ No newline at end of file
+-- \ No newline at end of file
diff --git a/Crossroads/nodes/(1801,5,1008).lua b/Crossroads/nodes/(1801,5,1008).lua
index 7741b35..72e6533 100644
--- a/Crossroads/nodes/(1801,5,1008).lua
+++ b/Crossroads/nodes/(1801,5,1008).lua
@@ -1,5 +1,5 @@
-if event.type == "train" then
+--[[if event.type == "train" then
if atc_arrow then
atc_set_text_outside("ATL Mithril Line - Ehlodex")
end
-end \ No newline at end of file
+end]] \ No newline at end of file
diff --git a/Crossroads/nodes/(2010,3,5938).lua b/Crossroads/nodes/(2010,3,5938).lua
index 99bcc37..4716a64 100644
--- a/Crossroads/nodes/(2010,3,5938).lua
+++ b/Crossroads/nodes/(2010,3,5938).lua
@@ -1,3 +1,4 @@
+do return end
if event.type == "punch" then
for i = 1, 4, 1 do
cancel_route("mary4-testsignal-"..tostring(i))
diff --git a/Crossroads/nodes/(30671,-6,1142).lua b/Crossroads/nodes/(30671,-6,1142).lua
new file mode 100644
index 0000000..a333ad4
--- /dev/null
+++ b/Crossroads/nodes/(30671,-6,1142).lua
@@ -0,0 +1 @@
+F.cpoint("wbx-ind", 300) \ No newline at end of file