summaryrefslogtreecommitdiff
path: root/Crossroads/init_code.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Crossroads/init_code.lua')
-rw-r--r--Crossroads/init_code.lua35
1 files changed, 22 insertions, 13 deletions
diff --git a/Crossroads/init_code.lua b/Crossroads/init_code.lua
index 7c92ec2..410b600 100644
--- a/Crossroads/init_code.lua
+++ b/Crossroads/init_code.lua
@@ -350,7 +350,10 @@ 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 F.stndet[stn] or not F.stndet[stn][trk] then
+ digiline_send("track"..trk, ("Track: %s\nNo departures"):format(trk))
+ 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
@@ -363,12 +366,14 @@ function F.pdisp(stn, trk, dn)
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
+ if #t == 0 then
+ t[1] = ("Track: %s\nNo departures"):format(trk)
+ end
S.pdt[stn][trk] = t
end
- local n = S.pd[stn][trk][dn] + 1
local t = S.pdt[stn][trk]
+ local n = S.pd[stn][trk][dn] % #t + 1
digiline_send("track"..trk,t[n])
- if n >= #t then n = 0 end
S.pd[stn][trk][dn] = n
end
@@ -425,6 +430,8 @@ F.stnlist = {
cg = "Colored Grasses",
clockwise = "Clockwise",
counterclockwise = "Counterclockwise",
+ cr = "Crossroads",
+ cra = "Crossroads Airport",
cras = "ARSE7's Shop",
crbfost = "Station East",
crbfsm = "Station St. Central",
@@ -433,10 +440,11 @@ F.stnlist = {
crch = "Crossroads City Hall",
crchs = "City Hall South",
crmtrail = "Mountain Railway Terminus",
+ crne = "Crossroads Northeast",
crshelter1 = "Shelter I",
crsfterm = "South Forest St. Terminal",
crsmacker = "Smacker's Station",
- crwm = "West Mountains",
+ crwm = "Crossroads West",
elchateau = "Chateau d'Erstazi",
elgp = "Greener Pastures",
elsf = "Salt Factory",
@@ -463,9 +471,10 @@ F.stnlist = {
occrt = "CRT Office",
ocmushroom = "Mushroom Market",
ocoutskirts = "Ocean City Outskirts",
- phsc = "Southern Crossing",
+ phsc = "Southern Cross",
phwest = "Personhood West",
scc = "Silver Coast Central",
+ sce = "Silver Coast East",
scn = "Silver Coast North",
scs = "Silver Coast South",
["SWALD-harbor"] = "Sakurawäldle Hafen",
@@ -493,21 +502,21 @@ end
F.lines = {
["AB"] = {
- name = "ATL-B Commuter", short = "ATL-B/C",
+ name = "ATL Bronze Line", short = "ATL-B",
ring = false,
interval = 240,
- [1] = { {"crch","2"}, --[[ {"crwm","3"},]] {"scs","N1"}, {"scc","N1"}, {"scn","N1"}, {"cg","1"}, {"thecube","4"}, --[[{"phsc","N"},]] {"grsc", "4"}, {"phwest","1"} },
- [2] = { {"phwest","1"}, {"grsc", "3"}, --[[{"phsc","S"},]] {"thecube","1"}, {"cg","2"}, {"scn","S1"}, {"scc","S1"}, {"scs","S1"}, --[[ {"crwm","4"}, ]] {"crch","2"} },
+ [1] = { {"crne","3"}, {"cr","34"}, --[[ {"crwm","3"},]] {"scs","N1"}, {"scc","N1"}, {"scn","N1"}, {"cg","1"}, {"thecube","4"}, {"phsc","4"}, {"grsc", "4"}, {"phwest","1"} },
+ [2] = { {"phwest","1"}, {"grsc", "3"}, {"phsc","3"}, {"thecube","1"}, {"cg","2"}, {"scn","S1"}, {"scc","S1"}, {"scs","S1"}, --[[ {"crwm","4"}, ]] {"cr","31"}, {"crne", "3"} },
},
- ["ABE"] = {
- name = "ATL-B Express", short = "ATL-B/E",
+ ["AM"] = {
+ name = "ATL Mithril Line", short = "ATL-M",
ring = false,
interval = 240,
- [1] = {{"crch","1"}, {"scc","N2"}, {"cg","1"}, {"thecube", "4"}, {"phwest", "2"}},
- [2] = {{"phwest", "2"}, {"thecube", "1"}, {"cg", "2"}, {"scc", "S2"}, {"crch", "1"}},
+ [1] = {{"cra","1"}, {"cr","32"}, {"sce", "1"}},
+ [2] = {{"sce","1"}, {"cr","33"}, {"cra", "1"}},
},
["AZ"] = {
- name = "ATL-Z", short = "ATL-Z",
+ name = "ATL Zinc Line", short = "ATL-Z",
ring = false,
interval = 480,
[1] = { {"Bts","3"}, {"evo","N/A"}, {"scs","N1"}, {"scc","N1"}, {"scn","N1"}, {"oc","K1"}, --[[{"elgp","N"}, {"elsf","E"}, {"elchateau","S"}]] },