diff options
116 files changed, 435 insertions, 190 deletions
diff --git a/Crossroads/init_code.lua b/Crossroads/init_code.lua index 185eef7..ec07d95 100644 --- a/Crossroads/init_code.lua +++ b/Crossroads/init_code.lua @@ -1,24 +1,17 @@ ---[[ -This environment has programs that can be separated to three parts: -I) Common functions -II) Common variables -III) ATL/CRT Bronze Line -]] - --- I) Common Functions if S.trains == nil then S.trains = {} end -if S.corrratio == nil then S.corrratio = 1 end -if S.corrratio > 1 then S.corrratio = 1 end -if S.corrratio <= 0 then S.corrratio = 1 end + +F.odj = {} -- F.dst - Get summer time function F.dst() if os.date().isdst then return "CEST" else return "CET" end end + -- F.error - Send error with error code function F.error(errorcode) error(F.errlist[errorcode]) end + --[[ F.stnbasic - Basis for all station functions: (By default, nil is defined as false or "no changes") stn = Station Code @@ -32,48 +25,53 @@ predepart = Function to execute before departure postdepart = Function to execute after departure next = Next stop ]] + function F.stnbasic(stn, side, optime, reverse, acc, out, reventry, predepart, postdepart, next,track) - if event.train then + if not event then return end + if event.type == "train" then if atc_arrow then - local t_start = os.clock() + if (get_rc() or ""):match ("FREIGHT") then + atc_send (reverse and "RSM" or "SM") + return + end local cmdstr="" - local corr = S.corrratio - local t_sched = ((optime or 15)+1)-- commented out due to trouble *corr - if out~=nil then atc_set_text_outside(out) end + local t_sched = ((optime or 15) + 1) + if out then + atc_set_text_outside (out) + end local intext = "Unknown Station" - if stn and F.stnlist[stn] then intext = F.stnlist[stn] end - --intext = intext .. "\nCorrection: " .. S.corrratio - atc_set_text_inside(intext) - cmdstr="BBWO"..(side or "R") - if predepart~=nil then predepart() end - S.trains[atc_id] = "P "..stn.." "..(track or "x") - cmdstr=cmdstr.."D"..math.floor((optime or 15))-- comment out due to trouble *S.corrratio) - cmdstr=cmdstr.."OCD1" - if reverse then cmdstr=cmdstr.."R" end - cmdstr=cmdstr.."S"..(acc or "M") - atc_send(cmdstr) - interrupt(t_sched,{sched=t_sched,start=t_start,corr=corr}) - else - if reventry==nil then F.error("wrong_direction") - else - if not reventry then F.error("wrong_direction") end + if stn then + intext = F.stnlist[stn] or stn + end + atc_set_text_inside (intext) + cmdstr = "BBWO" .. (side or "R") + if type (predepart) == "function" then + predepart () + end + S.trains[atc_id] = { + v = 1, + l = (get_line() or ""), + s = stn, + t = (trk or "N/A"), + } + cmdstr = cmdstr .."D" .. math.floor((optime or 15)) .. "OCD1" + if reverse then + cmdstr = cmdstr .. "R" end + cmdstr = cmdstr .. "S" .. (acc or "M") + atc_send (cmdstr) + interrupt (t_sched,"") end - end - if event.int then - if atc_id ~= nil then + elseif event.type == "int" then + if atc_id then local intext = "" - if next ~= nil then intext = "Next stop: "..(F.stnlist[next] or "???") end - if postdepart~=nil then postdepart() end - --[[ - if event.msg and event.msg.start and event.msg.sched and event.msg.corr then - local t_end = os.clock() - S.corrratio = event.msg.sched/event.msg.corr/(t_end-event.msg.start) - if S.corrratio > 1 then S.corrratio = 1 end + if next then + intext = "Next stop: " .. (F.stnlist[next] or next) end - ]] - --atc_set_text_inside(intext.."\nCorrection: "..S.corrratio) - atc_set_text_inside(intext) + if type (postdepart) == "function" then + postdepart () + end + atc_set_text_inside (intext) end end end @@ -110,11 +108,76 @@ function F.brk(dir) end end ---[[ F.eval - similar to the ? : operator in C -expr = the expression to evaluate -rettrue = the value to return if expr is true -retfalse = the value to return if expr is false -]] +-- Second version of the station function +function F.stn2gen(stn, trk, door, ret, chout) + if not stn then return end + if not trk then return end + if not door then return end + if door~="L" and door~="R" and door~="C" then return end + if event.type~="train" then return end + if not atc_arrow then return end + if not F.stndet[stn] then return end + if not F.stndet[stn][trk] then return end + local t = F.stndet[stn][trk] + local stop = false + if #t==0 then return end + local l = get_line() + if (not l) or l==" " then return end + if (get_rc() or ""):match("FREIGHT") then + atc_send (ret and "BBWRSM" or "SM") + return + end + for i = 1, #t, 1 do + if t[i][1]==l then + stop = true + atc_send("BBWO"..door.."D15OCD1"..(ret and "R" or "").."SM") + local intext = (F.stnlist[stn] or stn).."\n"..(F.stnlist[t[i][2]] and "Next station: "..F.stnlist[t[i][2]]..(t[i][3] and " (track "..t[i][3]..")" or "") or "End of Line") + 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 + atc_set_text_inside(intext) + if chout then atc_set_text_outside(outtext) end + S.trains[atc_id] = { + v = 2, + l = (get_line() or ""), + s = stn, + t = (trk or "N/A"), + } + break + end + end + if (not stop) then + atc_send(ret and "BBWRSM" or "SM") + end +end + +function F.disp2gen(stn) + if not stn then return end + if not F.stndet[stn] then return end + local s = F.stndet[stn] + local d={{(F.stnlist[stn] or stn).."\nTrack Line\n", os.date("%Y-%m-%d %H:%M %z", os.time()).."\nDestination\n"}} + local c=2 + local t={} + for i,_ in pairs(s) do t[#t+1]=i end + table.sort(t) + for i = 1,#t,1 do + local trkname = t[i] + local trk = s[trkname] + 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" + c=c+1 + 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]) + end + end +end + function F.eval(expr, rettrue, retfalse) if expr then return rettrue else return retfalse end end @@ -130,11 +193,7 @@ function F.checkpoint(name,arrow,opp) end end ---[[ II) Common Variables -F.stnlist = List of stations -F.errlist = List of errors -F.depint = Departure intervals -]] + F.stnlist = { cg = "Colored Grasses", clockwise = "Clockwise Route", @@ -146,12 +205,12 @@ F.stnlist = { crbfsw = "Crossroads Station St. West", crch = "Crossroads City Hall", crchs = "Crossroads City Hall South", - crmtrail = "Crossroads Mountain Railway Termius", - crnsw = "CR-North Station St. 9th Alley", + crmtrail = "Crossroads Mountain Railway Terminus", + crnsw = "CR North Station St. 9th Alley", crrathaus = "Crossroads City Hall", crsmacker = "Crossroads Smacker's Station", - crwm = "Crossroads-West Mountains", - crzn = "Crossroads-Zentrum/Nordstadt", + crwm = "Crossroads West Mountains", + crzn = "Crossroads Central/North", elchateau = "Erstaziland-Chateau d'Erstazi", elgp = "Erstaziland-Greener Pastures", elsf = "Erstaziland-Salt Factory", @@ -159,81 +218,123 @@ F.stnlist = { mushroom = "Mushroom Land", neverbuild = "Neverbuild", nvbcentral = "Neverbuild Central", - nvbold = "Neverbuild Old Termius", + nvbold = "Neverbuild Old Terminus", nvboutskirts = "Neverbuild Outskirts", oc = "Ocean City", - occh = "Ocean City, City Hall", - occrt = "Ocean City, CRT Office", - ocmushroom = "Ocean City, Mushroom Market", + occh = "Ocean City City Hall", + occrt = "Ocean City CRT Office", + ocmushroom = "Ocean City Mushroom Market", ocoutskirts = "Ocean City Outskirts", - phwest = "Personhood, West", + phsc = "Personhood Southern Crossing", + phwest = "Personhood West", scc = "Silver Coast Central", scn = "Silver Coast North", scs = "Silver Coast South", thecube = "The Cube", } + +F.lines = { + ["AB"] = { + name = "ATL Bronze Line", + ring = false, + [1] = { {"crch","A1"}, --[[ {"crwm","3"}, ]] {"scs","N"}, {"scc","N"}, {"scn","N"}, {"cg","1"}, {"thecube","4"}, {"phsc","N"}, {"phwest","7"} }, + [2] = { {"phwest","7"}, {"phsc","S"}, {"thecube","1"}, {"cg","2"}, {"scn","S"}, {"scc","S"}, {"scs","S"}, --[[ {"crwm","4"}, ]] {"crch","A1"} }, + }, + ["AZ"] = { + name = "ATL Zinc Line", + ring = false, + [1] = { {"evo","N/A"}, {"scs","N"}, {"scc","N"}, {"scn","N"}, {"oc","N"}, {"elgp","N"}, {"elsf","E"}, {"elchateau","S"} }, + [2] = { {"elchateau","S"}, {"elsf","W"}, {"elgp","S"}, {"oc","S"}, {"scn","S"}, {"scc","S"}, {"scs","S"}, {"evo","N/A"} }, + }, + ["CRT1"] = { + name = "CRT 1", + ring = false, + [1] = { {"crsmacker", "R3"}, {"crch", "U1"}, {"crchs", "W"}, {"cras", "N"} }, + [2] = { {"cras", "N"}, {"crchs", "E"}, {"crch", "U2"}, {"crsmacker", "R3"} }, + }, +} + +F.stndet = {} +for i, l in pairs(F.lines) do + for j = 1, #l, 1 do + local dir = l[j] + for k = 1, #dir, 1 do + local s = dir[k][1] + local t = dir[k][2] + if not F.stndet[s] then F.stndet[s] = {} end + if not F.stndet[s][t] then F.stndet[s][t] = {} end + 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]} + 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 + end + end + end +end + F.errlist = { + ["incorrect_setup"] = "Incorrect LuaATC track setup!", ["runaway_train"] = "Runaway train found!", ["train_disappeared"] = "Train has disappeared!", ["unexpected_train"] = "Train is not expected to pass!", ["wrong_direction"] = "Train passed in wrong direction!", } + F.depint = { ["AB"] = 60, ["AG"] = 120, ["CRT1"] = 30, } --- ATL/CRT Bronze Line - --- Colored Grasses -F.ab_cgw="--:-- "..F.dst() -F.ab_cge="--:-- "..F.dst() -F.ab_status = "Irregular operation" - -F.cg_disp = function() - if event.digiline then - if event.digiline then if not event.channel=="upd" then return end end - local t=os.date() - local cg="Colored Grasses\nATL/CRT Bronze Line\n" - local str = string.format("%26s\n%26s\n",os.date("%Y-%m-%d %H:%M %z",os.time()),F.ab_status) - digiline_send("bstg1-1",cg.."<-- Personhood West\n[1] via The Cube") - digiline_send("bstg1-2",string.format("%s%27s\n%27s",str,"Crossroads City Hall -->","via Silver Coast [2]")) - digiline_send("bstg2-1",cg.."<-- Crossroads City Hall\n[2] via Silver Coast") - digiline_send("bstg2-2",string.format("%s%27s\n%27s",str,"Personhood West -->","via The Cube [1]")) - digiline_send("bstg3","Scheduled departure (Track\nScheduled departure (Track") - digiline_send("bstg4",os.date("1): %H:%M %z%n2): %H:%M %z",os.time()+60)) - return - end - return -end -function F.cg_stn(gleis) - if event.train and atc_arrow then - if get_line()~="AB" then atc_send("SM") return end - atc_send("B0 W OR") - local time=os.date() - if time.sec>50 then time.sec=time.sec-11 end - local m="" - if time.min>58 then - m = string.format("%s%02d:%02d", m, F.eval(time.hour > 22, time.hour - 24, time.hour) + 1, time.min - 59) +F.dpts = { + ['CRT1'] = POS(1835,5,1000), + ['AG'] = POS(1399,4,2020), +} + +function F.odd(ln) + if event.type=='ext_int' then + if atc_id then + set_rc(event.message.rc) + atc_send('SM') else - m = string.format("%s%02d:%02d", m, time.hour, time.min + 1) + if type(F.odj[ln])~='table' then F.odj[ln] = {} end + for i = 1,(#F.odj[ln]) do + if F.odj[ln][i]==event then return end + end + table.insert(F.odj[ln],1,event) end - m = m .. " " .. F.dst() - atc_set_text_inside("Colored Grasses\nThis train will depart at: "..m) - interrupt(60-time.sec,"depart") - if gleis==1 then F.ab_cgw=m - else F.ab_cge=m + end + if event.type=='train' then + if F.odj[ln] and #F.odj[ln]~=0 then + ev = table.remove(F.odj[ln]) + if ev then + set_rc(ev.message.rc) + atc_send('BBWRSM') + return + else + F.odj[ln] = {} + end end + atc_send('BBWR') end - if event.int and event.message=="depart" then - atc_set_text_inside("") - time = os.date() - local nxt = string.format("%02d:%02d %s", F.eval(time.min>58, F.eval(time.hour>22, time.hour-23, time.hour+1), time.hour), F.eval(time.min>58, time.min-59, time.min+1), F.dst()) - atc_send("OC D1 SM") - if gleis==1 then F.ab_cgw=nxt - else F.ab_cge=nxt +end + +function F.ods(rc, side, rev) + if event.type=='train' then + if atc_arrow then + if string.find((get_rc() or ''),(rc or '')) then + atc_send('BBWO' .. (side or 'R') .. 'D10OCD1' .. ((rev or string.find((get_rc() or ''), 'R' .. rc)) and 'R' or '')..'SM') + elseif rev then + atc_send('BBWRSM') + end end end +end + +function F.odc(ln, rc) + interrupt_pos(F.dpts[ln],{['rc']=rc}) end
\ No newline at end of file diff --git a/Crossroads/nodes/(-5710,2,-3917).lua b/Crossroads/nodes/(-5710,2,-3917).lua index 65f7991..ad9f2d5 100644 --- a/Crossroads/nodes/(-5710,2,-3917).lua +++ b/Crossroads/nodes/(-5710,2,-3917).lua @@ -1,14 +1,14 @@ local testpos=POS(-5716,2,-3919) local chn="out" -local newstate=nil +local newstate='off' if event.type=="punch" then if is_passive(testpos) then - if newstate==nil then digiline_send(chn," true\n "..getstate(testpos)) + if newstate==nil then digiline_send(chn,"true | "..getstate(testpos)) else - digiline_send(chn," true\n "..getstate(testpos).."\n "..newstate) + digiline_send(chn,"true | "..getstate(testpos).." | "..tostring(newstate)) setstate(testpos,newstate) end - else digiline_send(chn," false") + else digiline_send(chn,"false") end end
\ No newline at end of file diff --git a/Crossroads/nodes/(-5716,6,-3927).lua b/Crossroads/nodes/(-5716,6,-3927).lua new file mode 100644 index 0000000..53f47ed --- /dev/null +++ b/Crossroads/nodes/(-5716,6,-3927).lua @@ -0,0 +1 @@ +F.disp2gen('crch')
\ No newline at end of file diff --git a/Crossroads/nodes/(1083,19,3012).lua b/Crossroads/nodes/(1083,19,3012).lua new file mode 100644 index 0000000..1ab12e4 --- /dev/null +++ b/Crossroads/nodes/(1083,19,3012).lua @@ -0,0 +1 @@ +F.stn2gen("phwest", "7", "R", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1100,16,1967).lua b/Crossroads/nodes/(1100,16,1967).lua new file mode 100644 index 0000000..194c3d9 --- /dev/null +++ b/Crossroads/nodes/(1100,16,1967).lua @@ -0,0 +1 @@ +F.stn2gen("thecube","1","L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1112,10,2635).lua b/Crossroads/nodes/(1112,10,2635).lua new file mode 100644 index 0000000..2333864 --- /dev/null +++ b/Crossroads/nodes/(1112,10,2635).lua @@ -0,0 +1 @@ +F.stn2gen("phsc","S","L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1112,10,2639).lua b/Crossroads/nodes/(1112,10,2639).lua new file mode 100644 index 0000000..40d327a --- /dev/null +++ b/Crossroads/nodes/(1112,10,2639).lua @@ -0,0 +1 @@ +F.stn2gen("phsc","N","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1117,16,1959).lua b/Crossroads/nodes/(1117,16,1959).lua new file mode 100644 index 0000000..29aeb3f --- /dev/null +++ b/Crossroads/nodes/(1117,16,1959).lua @@ -0,0 +1 @@ +F.stn2gen("thecube","4","L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1167,8,1013).lua b/Crossroads/nodes/(1167,8,1013).lua index 5f46f5d..14b42b6 100644 --- a/Crossroads/nodes/(1167,8,1013).lua +++ b/Crossroads/nodes/(1167,8,1013).lua @@ -1,5 +1,5 @@ if event.type == "train" then if atc_arrow then - atc_set_text_outside("ATL Mithril Line - Crossroads") + atc_set_text_outside("ATL Mithril Line") end end
\ No newline at end of file diff --git a/Crossroads/nodes/(1190,-6,1081).lua b/Crossroads/nodes/(1190,-6,1081).lua new file mode 100644 index 0000000..7a13d35 --- /dev/null +++ b/Crossroads/nodes/(1190,-6,1081).lua @@ -0,0 +1 @@ +F.stn2gen("scn","S","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1198,-6,1092).lua b/Crossroads/nodes/(1198,-6,1092).lua new file mode 100644 index 0000000..345042a --- /dev/null +++ b/Crossroads/nodes/(1198,-6,1092).lua @@ -0,0 +1 @@ +F.stn2gen("scn","N","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1219,9,1549).lua b/Crossroads/nodes/(1219,9,1549).lua index c54106a..854f01e 100644 --- a/Crossroads/nodes/(1219,9,1549).lua +++ b/Crossroads/nodes/(1219,9,1549).lua @@ -1 +1 @@ -F.timing(0,F.depint["AG"],"cg","thecube","R","M",nil,"1")
\ No newline at end of file +F.stn2gen("cg","1","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1224,12,1555).lua b/Crossroads/nodes/(1224,12,1555).lua index a150241..6577986 100644 --- a/Crossroads/nodes/(1224,12,1555).lua +++ b/Crossroads/nodes/(1224,12,1555).lua @@ -1 +1 @@ -F.cg_disp()
\ No newline at end of file +F.disp2gen("cg")
\ No newline at end of file diff --git a/Crossroads/nodes/(1227,12,1541).lua b/Crossroads/nodes/(1227,12,1541).lua index a150241..6577986 100644 --- a/Crossroads/nodes/(1227,12,1541).lua +++ b/Crossroads/nodes/(1227,12,1541).lua @@ -1 +1 @@ -F.cg_disp()
\ No newline at end of file +F.disp2gen("cg")
\ No newline at end of file diff --git a/Crossroads/nodes/(1232,9,1547).lua b/Crossroads/nodes/(1232,9,1547).lua index 32a814b..d8079bb 100644 --- a/Crossroads/nodes/(1232,9,1547).lua +++ b/Crossroads/nodes/(1232,9,1547).lua @@ -1 +1 @@ -F.timing(0,F.depint["AG"],"cg","scn","R","M",nil,"1")
\ No newline at end of file +F.stn2gen("cg","2","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1350,11,1371).lua b/Crossroads/nodes/(1350,11,1371).lua index a9a4f88..657ef63 100644 --- a/Crossroads/nodes/(1350,11,1371).lua +++ b/Crossroads/nodes/(1350,11,1371).lua @@ -1 +1 @@ -F.bhf("oc","scn","R","M",nil,"ZS")
\ No newline at end of file +F.stn2gen("oc","S","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1352,11,1389).lua b/Crossroads/nodes/(1352,11,1389).lua index 1b4c4ac..0b10a66 100644 --- a/Crossroads/nodes/(1352,11,1389).lua +++ b/Crossroads/nodes/(1352,11,1389).lua @@ -1 +1 @@ -F.bhf("oc","elgp","R","M",nil,"ZN")
\ No newline at end of file +F.stn2gen("oc", "N", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1359,11,1380).lua b/Crossroads/nodes/(1359,11,1380).lua index 9214f4d..011abe3 100644 --- a/Crossroads/nodes/(1359,11,1380).lua +++ b/Crossroads/nodes/(1359,11,1380).lua @@ -1 +1 @@ -F.timing(215, F.depint["AG"], "oc","ocoutskirts","R","M","ATL Gold Line - Neverbuild Central","T",true)
\ No newline at end of file +F.ods('AGSoc', 'R', true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1361,11,1379).lua b/Crossroads/nodes/(1361,11,1379).lua new file mode 100644 index 0000000..9781ffe --- /dev/null +++ b/Crossroads/nodes/(1361,11,1379).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSoc AGNocoutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1361,11,1380).lua b/Crossroads/nodes/(1361,11,1380).lua new file mode 100644 index 0000000..cc40968 --- /dev/null +++ b/Crossroads/nodes/(1361,11,1380).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSoc AGNnvboutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1361,11,1381).lua b/Crossroads/nodes/(1361,11,1381).lua new file mode 100644 index 0000000..3147e24 --- /dev/null +++ b/Crossroads/nodes/(1361,11,1381).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSoc AGNmushroom')
\ No newline at end of file diff --git a/Crossroads/nodes/(1361,11,1382).lua b/Crossroads/nodes/(1361,11,1382).lua new file mode 100644 index 0000000..e5316eb --- /dev/null +++ b/Crossroads/nodes/(1361,11,1382).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSoc AGNnvbold')
\ No newline at end of file diff --git a/Crossroads/nodes/(1361,11,1383).lua b/Crossroads/nodes/(1361,11,1383).lua new file mode 100644 index 0000000..d3fe189 --- /dev/null +++ b/Crossroads/nodes/(1361,11,1383).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSoc AGNnvbcentral')
\ No newline at end of file diff --git a/Crossroads/nodes/(1386,20,1722).lua b/Crossroads/nodes/(1386,20,1722).lua new file mode 100644 index 0000000..eda2ff4 --- /dev/null +++ b/Crossroads/nodes/(1386,20,1722).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSmushroom AGNnvbcentral')
\ No newline at end of file diff --git a/Crossroads/nodes/(1387,20,1723).lua b/Crossroads/nodes/(1387,20,1723).lua new file mode 100644 index 0000000..b7c5917 --- /dev/null +++ b/Crossroads/nodes/(1387,20,1723).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSmushroom AGNnvbold')
\ No newline at end of file diff --git a/Crossroads/nodes/(1388,-9,1323).lua b/Crossroads/nodes/(1388,-9,1323).lua new file mode 100644 index 0000000..35cbe98 --- /dev/null +++ b/Crossroads/nodes/(1388,-9,1323).lua @@ -0,0 +1 @@ +F.hst("ocmushroom","occh","L","M",nil,"2")
\ No newline at end of file diff --git a/Crossroads/nodes/(1388,-9,1379).lua b/Crossroads/nodes/(1388,-9,1379).lua new file mode 100644 index 0000000..c53d4a6 --- /dev/null +++ b/Crossroads/nodes/(1388,-9,1379).lua @@ -0,0 +1 @@ +F.hst("occh","occrt","R",8,nil,"2")
\ No newline at end of file diff --git a/Crossroads/nodes/(1388,5,1964).lua b/Crossroads/nodes/(1388,5,1964).lua new file mode 100644 index 0000000..b7047c9 --- /dev/null +++ b/Crossroads/nodes/(1388,5,1964).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvbcentral RAGSoc')
\ No newline at end of file diff --git a/Crossroads/nodes/(1388,5,1965).lua b/Crossroads/nodes/(1388,5,1965).lua new file mode 100644 index 0000000..86a7837 --- /dev/null +++ b/Crossroads/nodes/(1388,5,1965).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvbcentral RAGSocoutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1388,5,1966).lua b/Crossroads/nodes/(1388,5,1966).lua new file mode 100644 index 0000000..1c72cf4 --- /dev/null +++ b/Crossroads/nodes/(1388,5,1966).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvbcentral RAGSnvboutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1388,5,1977).lua b/Crossroads/nodes/(1388,5,1977).lua new file mode 100644 index 0000000..f7366dc --- /dev/null +++ b/Crossroads/nodes/(1388,5,1977).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvbcentral RAGSmushroom')
\ No newline at end of file diff --git a/Crossroads/nodes/(1388,5,1978).lua b/Crossroads/nodes/(1388,5,1978).lua new file mode 100644 index 0000000..79fa15f --- /dev/null +++ b/Crossroads/nodes/(1388,5,1978).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvbcentral RAGSnvbold')
\ No newline at end of file diff --git a/Crossroads/nodes/(1389,20,1723).lua b/Crossroads/nodes/(1389,20,1723).lua new file mode 100644 index 0000000..76ebd7a --- /dev/null +++ b/Crossroads/nodes/(1389,20,1723).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSmushroom RAGSnvboutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1390,20,1723).lua b/Crossroads/nodes/(1390,20,1723).lua new file mode 100644 index 0000000..72d77e0 --- /dev/null +++ b/Crossroads/nodes/(1390,20,1723).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSmushroom RAGSocoutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1391,20,1723).lua b/Crossroads/nodes/(1391,20,1723).lua new file mode 100644 index 0000000..166001f --- /dev/null +++ b/Crossroads/nodes/(1391,20,1723).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSmushroom AGSoc')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,19,1623).lua b/Crossroads/nodes/(1395,19,1623).lua new file mode 100644 index 0000000..f544a1c --- /dev/null +++ b/Crossroads/nodes/(1395,19,1623).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvboutskirts AGSoc')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,19,1624).lua b/Crossroads/nodes/(1395,19,1624).lua new file mode 100644 index 0000000..a00da3f --- /dev/null +++ b/Crossroads/nodes/(1395,19,1624).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvboutskirts RAGSocoutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,19,1626).lua b/Crossroads/nodes/(1395,19,1626).lua new file mode 100644 index 0000000..cce6686 --- /dev/null +++ b/Crossroads/nodes/(1395,19,1626).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSnvboutskirts AGNmushroom')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,19,1627).lua b/Crossroads/nodes/(1395,19,1627).lua new file mode 100644 index 0000000..3aa49a2 --- /dev/null +++ b/Crossroads/nodes/(1395,19,1627).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSnvboutskirts AGNnvbold')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,19,1628).lua b/Crossroads/nodes/(1395,19,1628).lua new file mode 100644 index 0000000..17e262c --- /dev/null +++ b/Crossroads/nodes/(1395,19,1628).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSnvboutskirts AGNnvbcentral')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,21,1829).lua b/Crossroads/nodes/(1395,21,1829).lua new file mode 100644 index 0000000..93cd05a --- /dev/null +++ b/Crossroads/nodes/(1395,21,1829).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvbold RAGSnvboutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,22,1829).lua b/Crossroads/nodes/(1395,22,1829).lua new file mode 100644 index 0000000..5d674ea --- /dev/null +++ b/Crossroads/nodes/(1395,22,1829).lua @@ -0,0 +1 @@ +F.odc('AG','AGSnvbold RAGSocoutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,23,1829).lua b/Crossroads/nodes/(1395,23,1829).lua new file mode 100644 index 0000000..3f7a3fc --- /dev/null +++ b/Crossroads/nodes/(1395,23,1829).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvbold AGSoc')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,8,1492).lua b/Crossroads/nodes/(1395,8,1492).lua new file mode 100644 index 0000000..171aba5 --- /dev/null +++ b/Crossroads/nodes/(1395,8,1492).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSocoutskirts AGSoc')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,8,1494).lua b/Crossroads/nodes/(1395,8,1494).lua new file mode 100644 index 0000000..dac0c0f --- /dev/null +++ b/Crossroads/nodes/(1395,8,1494).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSocoutskirts AGNnvboutskirts')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,8,1495).lua b/Crossroads/nodes/(1395,8,1495).lua new file mode 100644 index 0000000..4fe61eb --- /dev/null +++ b/Crossroads/nodes/(1395,8,1495).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSocoutskirts AGNmushroom')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,8,1496).lua b/Crossroads/nodes/(1395,8,1496).lua new file mode 100644 index 0000000..69d1cc4 --- /dev/null +++ b/Crossroads/nodes/(1395,8,1496).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSocoutskirts AGNnvbold')
\ No newline at end of file diff --git a/Crossroads/nodes/(1395,8,1497).lua b/Crossroads/nodes/(1395,8,1497).lua new file mode 100644 index 0000000..b7f16f1 --- /dev/null +++ b/Crossroads/nodes/(1395,8,1497).lua @@ -0,0 +1 @@ +F.odc('AG', 'RAGSocoutskirts AGNnvbcentral')
\ No newline at end of file diff --git a/Crossroads/nodes/(1399,4,2020).lua b/Crossroads/nodes/(1399,4,2020).lua new file mode 100644 index 0000000..94d3427 --- /dev/null +++ b/Crossroads/nodes/(1399,4,2020).lua @@ -0,0 +1 @@ +F.odd('AG')
\ No newline at end of file diff --git a/Crossroads/nodes/(1400,21,1829).lua b/Crossroads/nodes/(1400,21,1829).lua new file mode 100644 index 0000000..51f80da --- /dev/null +++ b/Crossroads/nodes/(1400,21,1829).lua @@ -0,0 +1 @@ +F.odc('AG','RAGSnvbold AGNnvbcentral')
\ No newline at end of file diff --git a/Crossroads/nodes/(1400,21,819).lua b/Crossroads/nodes/(1400,21,819).lua index 4b632e4..5fbaddf 100644 --- a/Crossroads/nodes/(1400,21,819).lua +++ b/Crossroads/nodes/(1400,21,819).lua @@ -1 +1,4 @@ -F.bhf("crwm","scs","L","M",nil,"FW")
\ No newline at end of file +-- F.bhf("crwm","scs","L","M",nil,"FW") +if event.type == 'train' then +atc_set_text_inside('This train does not stop at Crossroads West Mountains due to the state of emergency in Crossroads.\nNext stop: Silver Coast South') +end
\ No newline at end of file diff --git a/Crossroads/nodes/(1400,22,1829).lua b/Crossroads/nodes/(1400,22,1829).lua new file mode 100644 index 0000000..caac89e --- /dev/null +++ b/Crossroads/nodes/(1400,22,1829).lua @@ -0,0 +1 @@ +F.odc('AG', 'AGSnvbold RAGSmushroom')
\ No newline at end of file diff --git a/Crossroads/nodes/(1671,7,990).lua b/Crossroads/nodes/(1671,7,990).lua new file mode 100644 index 0000000..839b9ed --- /dev/null +++ b/Crossroads/nodes/(1671,7,990).lua @@ -0,0 +1 @@ +F.stn2gen("crsmacker", "R3", "L", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1675,20,985).lua b/Crossroads/nodes/(1675,20,985).lua new file mode 100644 index 0000000..3f91691 --- /dev/null +++ b/Crossroads/nodes/(1675,20,985).lua @@ -0,0 +1 @@ +F.ods('1Wcrsmacker','L',true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1708,6,914).lua b/Crossroads/nodes/(1708,6,914).lua new file mode 100644 index 0000000..c6d2888 --- /dev/null +++ b/Crossroads/nodes/(1708,6,914).lua @@ -0,0 +1 @@ +F.odc('CRT1','1Ecras R1Ecrchs')
\ No newline at end of file diff --git a/Crossroads/nodes/(1708,6,915).lua b/Crossroads/nodes/(1708,6,915).lua new file mode 100644 index 0000000..0f27426 --- /dev/null +++ b/Crossroads/nodes/(1708,6,915).lua @@ -0,0 +1 @@ +F.odc('CRT1','1Ecras R1Wcrchn')
\ No newline at end of file diff --git a/Crossroads/nodes/(1714,5,912).lua b/Crossroads/nodes/(1714,5,912).lua new file mode 100644 index 0000000..f9e2be2 --- /dev/null +++ b/Crossroads/nodes/(1714,5,912).lua @@ -0,0 +1 @@ +F.stn2gen ("cras", "N", "R", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1720,15,995).lua b/Crossroads/nodes/(1720,15,995).lua index c9162ac..1d2fbf8 100644 --- a/Crossroads/nodes/(1720,15,995).lua +++ b/Crossroads/nodes/(1720,15,995).lua @@ -1,4 +1 @@ -if event.train then -atc_set_text_inside("Next station:\nCrossroads City Hall") -atc_set_text_outside("ATL/CRT Bronze Line - Personhood West") -end
\ No newline at end of file +-- Obsolete: the track at the station should change the display
\ No newline at end of file diff --git a/Crossroads/nodes/(1738,-1,990).lua b/Crossroads/nodes/(1738,-1,990).lua new file mode 100644 index 0000000..a20d76a --- /dev/null +++ b/Crossroads/nodes/(1738,-1,990).lua @@ -0,0 +1 @@ +F.stn2gen ("crch", "U1", "L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1755,27,943).lua b/Crossroads/nodes/(1755,27,943).lua index eeaa266..d09f055 100644 --- a/Crossroads/nodes/(1755,27,943).lua +++ b/Crossroads/nodes/(1755,27,943).lua @@ -1,57 +1,37 @@ -local head="TRAIN STATUS" -local function trainpairs(t, f) - local a = {} - for n in pairs(t) do table.insert(a, n) end - table.sort(a, f) - local i = 0 - local iter = function () - i = i + 1 - if a[i] == nil then return nil - else return a[i], t[a[i]] - end - end - return iter -end +local head = { "V TRAIN LINE STATION", " " } local length = 18 -if event.type=="digiline" then - if event.channel=="upd_main" then +if event.type=="digiline" or event.type=="punch" then + if event.channel=="upd_main" or event.type=="punch" then local start_t = os.clock() if not S.lagrec then S.lagrec = {} end - local l = {} + local la = {} + local lb = {} local i - for i=1,length,1 do - if i%2 == 0 then - l[i]="" - else - l[i]=head - end - end local counter=0 - for id,st in trainpairs(S.trains) do - if (counter) % 7 < 3 then - i = (counter - counter % 7) / 7 * 2 + 1 - else - i = (counter - counter % 7) / 7 * 2 + 2 - end - l[i] = l[i] .. "\n" .. id .. " " .. st + local ids = {} + for i in pairs(S.trains) do ids[#ids+1] = i end + table.sort(ids) + 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)) counter = counter + 1 end - for i=1,length,1 do - if l[i]=="" then - digiline_send("d"..tostring(i),"...") - else - digiline_send("d"..tostring(i),l[i]) - 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 "") end local end_t = os.clock() - table.insert(S.lagrec,end_t - start_t) + S.lagrec[#S.lagrec+1] = end_t - start_t table.sort(S.lagrec) local lagavg = 0 - for _,v in pairs(S.lagrec) do - lagavg = lagavg + v - end + for i = 1, #S.lagrec, 1 do lagavg = lagavg + S.lagrec[i] end lagavg = lagavg / #S.lagrec - digiline_send("lag1", "DEBUG\nTRAINS: " .. counter .. "\nDISPS: " .. length .. "\nTS: " .. os.time()) + digiline_send("lag1", "DEBUG\nTRAINS: " .. counter .. "\nTS: " .. os.time()) digiline_send("lag2", "CUR " .. (end_t - start_t) .. "\nMIN " .. S.lagrec[1] .. "\nMAX " .. S.lagrec[#S.lagrec] .. "\nAVG " .. lagavg) end end
\ No newline at end of file diff --git a/Crossroads/nodes/(1758,-1,998).lua b/Crossroads/nodes/(1758,-1,998).lua new file mode 100644 index 0000000..4116d94 --- /dev/null +++ b/Crossroads/nodes/(1758,-1,998).lua @@ -0,0 +1 @@ +F.stn2gen ("crch", "U2", "L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1760,5,1000).lua b/Crossroads/nodes/(1760,5,1000).lua new file mode 100644 index 0000000..ccb559e --- /dev/null +++ b/Crossroads/nodes/(1760,5,1000).lua @@ -0,0 +1,5 @@ +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 diff --git a/Crossroads/nodes/(1771,6,914).lua b/Crossroads/nodes/(1771,6,914).lua new file mode 100644 index 0000000..57c8ce9 --- /dev/null +++ b/Crossroads/nodes/(1771,6,914).lua @@ -0,0 +1 @@ +F.odc('CRT1', 'R1Ecrchs 1Wcras')
\ No newline at end of file diff --git a/Crossroads/nodes/(1773,5,994).lua b/Crossroads/nodes/(1773,5,994).lua index a44cbcf..b65a919 100644 --- a/Crossroads/nodes/(1773,5,994).lua +++ b/Crossroads/nodes/(1773,5,994).lua @@ -1 +1 @@ -F.timing(0, F.depint["AB"], "crch", "crwm", "R", "M", "ATL Bronze Line - Personhood West", "1", true)
\ No newline at end of file +F.stn2gen ("crch", "A1", "R", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1777,5,912).lua b/Crossroads/nodes/(1777,5,912).lua new file mode 100644 index 0000000..03a63bd --- /dev/null +++ b/Crossroads/nodes/(1777,5,912).lua @@ -0,0 +1 @@ +F.stn2gen ("crchs", "E", "L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1787,6,914).lua b/Crossroads/nodes/(1787,6,914).lua new file mode 100644 index 0000000..7201ebc --- /dev/null +++ b/Crossroads/nodes/(1787,6,914).lua @@ -0,0 +1 @@ +F.odc('CRT1','1Ecrchs R1Wcrchn')
\ No newline at end of file diff --git a/Crossroads/nodes/(1787,6,915).lua b/Crossroads/nodes/(1787,6,915).lua new file mode 100644 index 0000000..6e7052f --- /dev/null +++ b/Crossroads/nodes/(1787,6,915).lua @@ -0,0 +1 @@ +F.odc('CRT1','1Ecrchs R1Wcrsmacker')
\ No newline at end of file diff --git a/Crossroads/nodes/(1789,20,995).lua b/Crossroads/nodes/(1789,20,995).lua new file mode 100644 index 0000000..de7fd7b --- /dev/null +++ b/Crossroads/nodes/(1789,20,995).lua @@ -0,0 +1 @@ +F.ods('1Wcrchn','L')
\ No newline at end of file diff --git a/Crossroads/nodes/(1791,20,995).lua b/Crossroads/nodes/(1791,20,995).lua new file mode 100644 index 0000000..499937e --- /dev/null +++ b/Crossroads/nodes/(1791,20,995).lua @@ -0,0 +1 @@ +F.ods('1Ecrchn','R')
\ No newline at end of file diff --git a/Crossroads/nodes/(1791,5,912).lua b/Crossroads/nodes/(1791,5,912).lua new file mode 100644 index 0000000..01add38 --- /dev/null +++ b/Crossroads/nodes/(1791,5,912).lua @@ -0,0 +1 @@ +F.stn2gen ("crchs", "W", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1797,21,989).lua b/Crossroads/nodes/(1797,21,989).lua new file mode 100644 index 0000000..eb3dcc3 --- /dev/null +++ b/Crossroads/nodes/(1797,21,989).lua @@ -0,0 +1 @@ +F.odc('CRT1','1Wcrchn R1Wcrsmacker')
\ No newline at end of file diff --git a/Crossroads/nodes/(1798,21,989).lua b/Crossroads/nodes/(1798,21,989).lua new file mode 100644 index 0000000..4737454 --- /dev/null +++ b/Crossroads/nodes/(1798,21,989).lua @@ -0,0 +1 @@ +F.odc('CRT1','R1Wcrchn 1Wcrchs')
\ No newline at end of file diff --git a/Crossroads/nodes/(1799,21,989).lua b/Crossroads/nodes/(1799,21,989).lua new file mode 100644 index 0000000..350f81e --- /dev/null +++ b/Crossroads/nodes/(1799,21,989).lua @@ -0,0 +1 @@ +F.odc('CRT1','R1Wcrchn 1Wcras')
\ No newline at end of file diff --git a/Crossroads/nodes/(1835,5,1000).lua b/Crossroads/nodes/(1835,5,1000).lua new file mode 100644 index 0000000..ed5dd1c --- /dev/null +++ b/Crossroads/nodes/(1835,5,1000).lua @@ -0,0 +1 @@ +-- 1835 5 1000
\ No newline at end of file diff --git a/Crossroads/nodes/(2065,5,978).lua b/Crossroads/nodes/(2065,5,978).lua new file mode 100644 index 0000000..29f42b5 --- /dev/null +++ b/Crossroads/nodes/(2065,5,978).lua @@ -0,0 +1,9 @@ +if event.type=="train" then + if atc_arrow then + atc_send("OC") + atc_set_text_outside("") + atc_set_text_inside("") + set_rc("") + end + --unset_shunt() +end
\ No newline at end of file diff --git a/Crossroads/nodes/(851,14,773).lua b/Crossroads/nodes/(851,14,773).lua index aabbc7b..c27c086 100644 --- a/Crossroads/nodes/(851,14,773).lua +++ b/Crossroads/nodes/(851,14,773).lua @@ -1,12 +1,11 @@ if event.train then if atc_arrow then - atc_send("B0 W OL") + atc_send("BB W OLD15OCD2SM") atc_set_text_inside("EVO") interrupt(15) end end if event.int then - atc_send("OCD2SM") atc_set_text_inside("") end
\ No newline at end of file diff --git a/Crossroads/nodes/(864,14,793).lua b/Crossroads/nodes/(864,14,793).lua index da49bc9..97639de 100644 --- a/Crossroads/nodes/(864,14,793).lua +++ b/Crossroads/nodes/(864,14,793).lua @@ -1,11 +1,10 @@ if event.train then if atc_arrow then - atc_send("B0 W OL") + atc_send("BB W OLD15OCD2SM") atc_set_text_inside("EVO") interrupt(15) end end if event.int then - atc_send("OCD2SM") atc_set_text_inside("") end
\ No newline at end of file diff --git a/Crossroads/nodes/(867,14,776).lua b/Crossroads/nodes/(867,14,776).lua index 08ccb2c..7e1e849 100644 --- a/Crossroads/nodes/(867,14,776).lua +++ b/Crossroads/nodes/(867,14,776).lua @@ -1,12 +1,11 @@ if event.train then if atc_arrow then - atc_send("B0WOL") + atc_send("BBWOLD15OCD2SM") atc_set_text_inside("EVO") interrupt(15) end end -if event.int then +if event.int and atc_id then atc_set_text_inside("") - atc_send("OCD2SM") end
\ No newline at end of file diff --git a/X_Nihilo/nodes/(2225,-36,6144).lua b/X_Nihilo/nodes/(2225,-36,6144).lua index 4f43320..1e354b9 100644 --- a/X_Nihilo/nodes/(2225,-36,6144).lua +++ b/X_Nihilo/nodes/(2225,-36,6144).lua @@ -20,7 +20,7 @@ end if event.type == "int" then if event.message == "departure" then setstate(switch,"cr") - atc_send("OCD2SM"); +-- atc_send("OCD2SM"); end return end
\ No newline at end of file diff --git a/durt/init_code.lua b/durt/init_code.lua index 2ecf27d..831063c 100644 --- a/durt/init_code.lua +++ b/durt/init_code.lua @@ -1 +1 @@ -S.lines = {
S23 = {
termini = {
N = "Arc",
S = "Rew"
},
stations = {
Rew = {
name = "Redwood",
doors = "L",
next_station = {
N = "Thc",
S = false
},
},
Thc = {
name = "Tanh Cliffs",
doors = "L",
next_station = {
N = "Noi",
S = "Rew"
},
},
Noi = {
name = "No Idea",
doors = "L",
next_station = {
N = "Lzf",
S = "Thc"
},
},
Lzf = {
name = "Laza's Field",
doors = "L",
next_station = {
N = "Bbh",
S = "Noi"
},
},
Bbh = {
name = "Bamboo Hills",
doors = "L",
next_station = {
N = "Arc",
S = "Lzf"
},
},
Arc = {
name = "Arcadius",
doors = "L",
next_station = {
N = false,
S = "Bbh"
},
}
},
monitoring = {
N = {},
S = {}
}
},
U21 = {
termini = {
E = "Tro",
W = "Dbl"
},
stations = {
Dbl = {
name = "Dubulti",
doors = "R",
next_station = {
E = "Pav",
W = "Ghd"
}
},
Pav = {
name = "Pence Avenue",
doors = "L",
next_station = {
E = "Ghd",
W = "Dbl"
}
},
Ghd = {
name = "Greenhat Mountain",
doors = "L",
next_station = {
E = "Acm",
W = "Dbl"
}
},
Acm = {
name = "Acacia Mountains",
doors = "L",
next_station = {
E = "Ghb",
W = "Ghd"
}
},
Ghb = {
name = "Green Hill Beach",
doors = "L",
next_station = {
E = "Ged",
W = "Acm"
}
},
Ged = {
name = "Green Edge",
doors = "L",
next_station = {
E = "Dri",
W = "Ghb"
}
},
Dri = {
name = "Dry Island",
doors = "L",
next_station = {
E = "Gcl",
W = "Ged"
}
},
Gcl = {
name = "Green Cliffs",
doors = "R",
next_station = {
E ="Sfs",
W = "Dri"
}
},
Sfs = {
name = "South Forest",
doors = "R",
next_station = {
E = "Jms",
W = "Gcl"
}
},
Jms = {
name = "Jude Milhon Street",
doors = "R",
next_station = {
E = "Bam",
W = "Sfs"
}
},
Bam = {
name = "Bamboo Hills",
doors = "R",
next_station = {
E = "Cli",
W = "Jms"
}
},
Cli = {
name = "Clown Island",
doors = "R",
next_station = {
E = "Wat",
W = "Bam"
}
},
Wat = {
name = "Something in the Water",
doors = "L",
next_station = {
E = "Duf",
W = "Cli"
}
},
Duf = {
name = "Duff Rd",
doors = "R",
next_station = {
E = "Tro",
W = "Wat"
}
},
Tro = {
name = "Turtle Rock",
doors = "L",
next_station = {
E = false,
W = "Duf"
},
}
},
monitoring = {
E = {},
W = {},
S = {},
N = {}
}
}
}
---------------------------------------------------------------------
--defining the functions
F.arrive = function(stn_code,dir,line)
S.lines[line].monitoring[dir][stn_code] = atc_id
atc_send("B0 W O"..S.lines[line].stations[stn_code].doors)
atc_set_text_inside("Arrived at:\n"..S.lines[line].stations[stn_code].name.."\n \nNext Station:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[dir]].name)
end
F.depart = function(stn_code,dir,line)
local pos = stn_code..dir
local inside_text = "Next Stop:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[dir]].name
if can_set_route(pos,stn_code.."->"..S.lines[line].stations[stn_code].next_station[dir]) then
set_route(pos,stn_code.."->"..S.lines[line].stations[stn_code].next_station[dir])
atc_send("OC SM")
S.lines[line].monitoring[dir][stn_code] = nil
S.lines[line].monitoring[dir][S.lines[line].stations[stn_code].next_station[dir]] = atc_id
else
-- Wait another 5s before trying again
inside_text = inside_text.."\nWaiting to depart..."
interrupt(5, "depart")
end
atc_set_text_inside(inside_text)
end
F.set_desto = function(dir, line)
atc_set_text_outside("LINE " .. line .."\n---> " .. S.lines[line].stations[S.lines[line].termini[dir]].name)
end
---------------------------------------------------------------------
--LuaATC track functions
F.station = function(stn_code,dir,line)
-- temp until all SF LuaAtc tracks are changed-------------------------
if line == nil or line == "1" then
line = "U21"
end
---------------------------------------------------------------------
if event.train then
F.arrive(stn_code,dir,line)
interrupt(10,"depart")
elseif event.int and event.msg=="depart" then
F.depart(stn_code,dir,line)
end
end
F.terminus = function(stn_code, newdir, line)
if event.train then
S.lines[line].monitoring[newdir][stn_code] = atc_id
atc_send("B0 W R O"..S.lines[line].stations[stn_code].doors)
atc_set_text_inside("Arrived at:\n"..S.lines[line].stations[stn_code].name.."\n \nNext Station:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[newdir]].name)
atc_set_text_outside("LINE " .. line .."\n---> " .. S.lines[line].stations[S.lines[line].termini[newdir]].name)
interrupt(10, "depart")
end
if event.int and event.msg == "depart" then
F.depart(stn_code, newdir,line)
end
end
\ No newline at end of file +S.lines = {
S23 = {
termini = {
N = "Arc",
S = "Rew"
},
stations = {
Rew = {
name = "Redwood",
doors = "L",
next_station = {
N = "Thc",
S = false
},
},
Thc = {
name = "Tanh Cliffs",
doors = "L",
next_station = {
N = "Noi",
S = "Rew"
},
},
Noi = {
name = "No Idea",
doors = "L",
next_station = {
N = "Lzf",
S = "Thc"
},
},
Lzf = {
name = "Laza's Field",
doors = "L",
next_station = {
N = "Bbh",
S = "Noi"
},
},
Bbh = {
name = "Bamboo Hills",
doors = "L",
next_station = {
N = "Arc",
S = "Lzf"
},
},
Arc = {
name = "Arcadius",
doors = "L",
next_station = {
N = false,
S = "Bbh"
},
}
},
monitoring = {
N = {},
S = {}
}
},
U21 = {
termini = {
E = "Tro",
W = "Dbl"
},
stations = {
Dbl = {
name = "Dubulti",
doors = "R",
next_station = {
E = "Pav",
W = "Ghd"
}
},
Pav = {
name = "Pence Avenue",
doors = "L",
next_station = {
E = "Ghd",
W = "Dbl"
}
},
Ghd = {
name = "Greenhat Mountain",
doors = "L",
next_station = {
E = "Acm",
W = "Dbl"
}
},
Acm = {
name = "Acacia Mountains",
doors = "L",
next_station = {
E = "Ghb",
W = "Ghd"
}
},
Ghb = {
name = "Green Hill Beach",
doors = "L",
next_station = {
E = "Ged",
W = "Acm"
}
},
Ged = {
name = "Green Edge",
doors = "L",
next_station = {
E = "Dri",
W = "Ghb"
}
},
Dri = {
name = "Dry Island",
doors = "L",
next_station = {
E = "Gcl",
W = "Ged"
}
},
Gcl = {
name = "Green Cliffs",
doors = "R",
next_station = {
E ="Sfs",
W = "Dri"
}
},
Sfs = {
name = "South Forest",
doors = "R",
next_station = {
E = "Jms",
W = "Gcl"
}
},
Jms = {
name = "Jude Milhon Street",
doors = "R",
next_station = {
E = "Bam",
W = "Sfs"
}
},
Bam = {
name = "Bamboo Hills",
doors = "R",
next_station = {
E = "Cli",
W = "Jms"
}
},
Cli = {
name = "Clown Island",
doors = "R",
next_station = {
E = "Wat",
W = "Bam"
}
},
Wat = {
name = "Something in the Water",
doors = "L",
next_station = {
E = "Duf",
W = "Cli"
}
},
Duf = {
name = "Duff Rd",
doors = "R",
next_station = {
E = "Tro",
W = "Wat"
}
},
Tro = {
name = "Turtle Rock",
doors = "L",
next_station = {
E = false,
W = "Duf"
},
}
},
monitoring = {
E = {},
W = {},
S = {},
N = {}
}
}
}
S.runarounds = {
["TheStacks"] = {},
["M27_Quarry_runaround"] = {},
}
---------------------------------------------------------------------
--defining the functions
F.arrive = function(stn_code,dir,line)
S.lines[line].monitoring[dir][stn_code] = atc_id
atc_send("B0 W O"..S.lines[line].stations[stn_code].doors)
atc_set_text_inside("Arrived at:\n"..S.lines[line].stations[stn_code].name.."\n \nNext Station:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[dir]].name)
end
F.depart = function(stn_code,dir,line)
local pos = stn_code..dir
local inside_text = "Next Stop:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[dir]].name
if can_set_route(pos,stn_code.."->"..S.lines[line].stations[stn_code].next_station[dir]) then
set_route(pos,stn_code.."->"..S.lines[line].stations[stn_code].next_station[dir])
atc_send("OC SM")
S.lines[line].monitoring[dir][stn_code] = nil
S.lines[line].monitoring[dir][S.lines[line].stations[stn_code].next_station[dir]] = atc_id
else
-- Wait another 5s before trying again
inside_text = inside_text.."\nWaiting to depart..."
interrupt(5, "depart")
end
atc_set_text_inside(inside_text)
end
F.set_desto = function(dir, line)
atc_set_text_outside("LINE " .. line .."\n---> " .. S.lines[line].stations[S.lines[line].termini[dir]].name)
end
---------------------------------------------------------------------
--LuaATC track functions
F.station = function(stn_code,dir,line)
-- temp until all SF LuaAtc tracks are changed-------------------------
if line == nil or line == "1" then
line = "U21"
end
---------------------------------------------------------------------
if event.train then
F.arrive(stn_code,dir,line)
interrupt(10,"depart")
elseif event.int and event.msg=="depart" then
F.depart(stn_code,dir,line)
end
end
F.terminus = function(stn_code, newdir, line)
if event.train then
S.lines[line].monitoring[newdir][stn_code] = atc_id
atc_send("B0 W R O"..S.lines[line].stations[stn_code].doors)
atc_set_text_inside("Arrived at:\n"..S.lines[line].stations[stn_code].name.."\n \nNext Station:\n"..S.lines[line].stations[S.lines[line].stations[stn_code].next_station[newdir]].name)
atc_set_text_outside("LINE " .. line .."\n---> " .. S.lines[line].stations[S.lines[line].termini[newdir]].name)
interrupt(10, "depart")
end
if event.int and event.msg == "depart" then
F.depart(stn_code, newdir,line)
end
end
\ No newline at end of file diff --git a/durt/nodes/(-1226,13,-2135).lua b/durt/nodes/(-1226,13,-2135).lua new file mode 100644 index 0000000..ccf5d5d --- /dev/null +++ b/durt/nodes/(-1226,13,-2135).lua @@ -0,0 +1,9 @@ +if get_line() == "S23" or get_line() == "BH" then + if atc_arrow then + atc_set_text_inside("S23 -> Arcadius") + atc_set_text_outside("S23 -> Arcadius") + else + atc_set_text_inside("Terminus: Mom Junction/nChange here for E1, E10 and Mom Express") + atc_set_text_outside("S23") + end +end
\ No newline at end of file diff --git a/durt/nodes/(-1924,13,-1692).lua b/durt/nodes/(-1924,13,-1692).lua index 88ad8a6..6b92378 100644 --- a/durt/nodes/(-1924,13,-1692).lua +++ b/durt/nodes/(-1924,13,-1692).lua @@ -1 +1 @@ -signal = "foundry_roads_sorting"
if (event.train and atc_arrow) or (event.int and event.message == "check_signal") then
if can_set_route(signal,"In Road") then
set_route(signal,"In Road")
elseif can_set_route(signal,"Out Road") then
set_route(signal,"Out Road")
else
if atc_speed > 0 then
atc_send("S0")
else
atc_send("B0")
end
interrupt(5,"check_signal")
return
end
atc_send("S1")
return
end
\ No newline at end of file +signal = "foundry_roads_sorting"
if (event.train and atc_arrow) or (event.int and event.message == "check_signal") then
if can_set_route(signal,"In Road (Fuel In)") then
set_route(signal,"In Road (Fuel In)")
elseif can_set_route(signal,"Out Road (Loadout)") then
set_route(signal,"Out Road (Loadout)")
else
if atc_speed > 0 then
atc_send("S0")
else
atc_send("B0")
end
interrupt(5,"check_signal")
return
end
atc_send("S1")
return
end
\ No newline at end of file diff --git a/durt/nodes/(-2084,21,851).lua b/durt/nodes/(-2084,21,851).lua index 18e9eef..555a3ed 100644 --- a/durt/nodes/(-2084,21,851).lua +++ b/durt/nodes/(-2084,21,851).lua @@ -1,7 +1,7 @@ if get_line() == "S23" or get_line() == "BH" then if atc_arrow then - atc_set_text_inside("S23 -> Redwood") - atc_set_text_outside("S23 -> Redwood") + atc_set_text_inside("S23 -> Mom Junction") + atc_set_text_outside("S23 -> Mom Junction") else atc_set_text_inside("Terminus: Arcadius/nChange here for S20") atc_set_text_outside("S23") diff --git a/durt/nodes/(-2734,10,-1693).lua b/durt/nodes/(-2734,10,-1693).lua new file mode 100644 index 0000000..8043b8c --- /dev/null +++ b/durt/nodes/(-2734,10,-1693).lua @@ -0,0 +1 @@ +--Still need to convert to a function rather than trackside
local hs_sig = "M27_Quarry_Headshunt"
local hs_route = "Headshunt"
local exit_sig = "M27_Quarry_Exit"
local exit_route = "Exit to Mainline"
local siding_id = "M27_Quarry_runaround"
local length_prefix = "Loco"
if (event.train and atc_arrow) then
local rc = get_rc() or " "
-- the RC that controls the link to split
-- rc value: "<rc><num_wagons to shunt with>" default is single loco
-- eg "Loco2" for tenders, "Loco3" for
local loco_pos = rc:match(length_prefix.."%d+") or length_prefix.."1"
loco_pos = tonumber(loco_pos:match("%d+"))+1
if not S.runarounds[siding_id].shunting then -- train to be split
--store info for later re-insertion
S.runarounds[siding_id] = {
['shunting'] = true,
['rc'] = rc,
['line'] = get_line() or " "
}
atc_send("B0S0")
interrupt(5,{['cmd'] = "split", ['leng'] = loco_pos})
-- change int time if needed, depends on approach speed slowdown
else -- train has rejoined
--re-insert info to train
if S.runarounds[siding_id].rc then set_rc(S.runarounds[siding_id].rc) end
if S.runarounds[siding_id].line then set_line(S.runarounds[siding_id].line) end
--depart
atc_send("B0WD3RSM")
set_route(exit_sig,exit_route)
S.runarounds[siding_id].shunting = false
end
end
if event.int then
if event.msg.cmd=="split" then
cmd = event.msg
split_at_index(cmd.leng,"")
set_rc(S.runarounds[siding_id].rc .. " shunt_limit")
atc_send("S2")
set_route(hs_sig,hs_route)
end
end
\ No newline at end of file diff --git a/durt/nodes/(-3820,18,-4730).lua b/durt/nodes/(-3820,18,-4730).lua new file mode 100644 index 0000000..cd90f80 --- /dev/null +++ b/durt/nodes/(-3820,18,-4730).lua @@ -0,0 +1,7 @@ +if (atc_arrow and event.type == "train" and get_rc() == "sfh_shunt") then + setstate("SFH-T1-N", "st") + atc_send("B0") + interrupt(8, "proceed") +elseif (event.type == "interrupt") then + atc_send("R S2") +end
\ No newline at end of file diff --git a/durt/nodes/(-3820,18,-4743).lua b/durt/nodes/(-3820,18,-4743).lua new file mode 100644 index 0000000..3f5d585 --- /dev/null +++ b/durt/nodes/(-3820,18,-4743).lua @@ -0,0 +1,3 @@ +if atc_arrow and get_rc() == "sfh_shunt" then + set_rc("sfh_service") +end
\ No newline at end of file diff --git a/durt/nodes/(-3821,18,-4761).lua b/durt/nodes/(-3821,18,-4761).lua new file mode 100644 index 0000000..14c0d7c --- /dev/null +++ b/durt/nodes/(-3821,18,-4761).lua @@ -0,0 +1,14 @@ +if atc_arrow then + if (event.type == "train") then + atc_send("B0") + setstate("SFH-T2-S", "cr") + set_rc("sfh_shunt") + interrupt(5, "proceed") + elseif (event.type == "int") then + set_route("sfh-T1-headshunt", "Enter Headshunt") + split_at_index(2, "") + atc_send("S2") + end +else + atc_send("B0WRS1") +end
\ No newline at end of file diff --git a/durt/nodes/(-3824,18,-4774).lua b/durt/nodes/(-3824,18,-4774).lua new file mode 100644 index 0000000..5ac8a65 --- /dev/null +++ b/durt/nodes/(-3824,18,-4774).lua @@ -0,0 +1,7 @@ +if ((event.type == "train") and atc_arrow) then + atc_send("B0") + setstate("SFH-T2-S", "st") + interrupt(3, "proceed") +elseif (event.type == "int") then + atc_send("R S4") +end
\ No newline at end of file diff --git a/durt/nodes/(-4158,12,-2742).lua b/durt/nodes/(-4158,12,-2742).lua new file mode 100644 index 0000000..b18dc7f --- /dev/null +++ b/durt/nodes/(-4158,12,-2742).lua @@ -0,0 +1 @@ +--Still need to convert to a function rather than trackside
local hs_sig = "TheStacks_hs"
local hs_route = "Right to Wye"
local exit_sig = "TheStacks_exit"
local exit_route = "Exit to Mainline"
local siding_id = "TheStacks"
local length_prefix = "Loco"
if (event.train and atc_arrow) then
local rc = get_rc() or " "
-- the RC that controls the link to split
-- rc value: "<rc><num_wagons to shunt with>" default is single loco
-- eg "Loco2" for tenders, "Loco3" for
local loco_pos = rc:match(length_prefix.."%d+") or length_prefix.."1"
loco_pos = tonumber(loco_pos:match("%d+"))+1
if not S.runarounds[siding_id].shunting then -- train to be split
--store info for later re-insertion
S.runarounds[siding_id] = {
['shunting'] = true,
['rc'] = rc,
['line'] = get_line() or " "
}
atc_send("B0S0")
interrupt(5,{['cmd'] = "split", ['leng'] = loco_pos})
-- change int time if needed, depends on approach speed slowdown
else -- train has rejoined
--re-insert info to train
if S.runarounds[siding_id].rc then set_rc(S.runarounds[siding_id].rc) end
if S.runarounds[siding_id].line then set_line(S.runarounds[siding_id].line) end
--depart
atc_send("B0S0WD1RSM")
set_route(exit_sig,exit_route)
S.runarounds[siding_id].shunting = false
end
end
if event.int then
if event.msg.cmd=="split" then
cmd = event.msg
split_at_index(cmd.leng,"")
atc_send("S2")
set_route(hs_sig,hs_route)
end
end
\ No newline at end of file diff --git a/durt/nodes/(180,20,1256).lua b/durt/nodes/(180,20,1256).lua new file mode 100644 index 0000000..e3b6223 --- /dev/null +++ b/durt/nodes/(180,20,1256).lua @@ -0,0 +1,3 @@ +if atc_arrow then + setstate("EWLF-N", "cr") +end
\ No newline at end of file diff --git a/il_timetable/nodes/(-527,23,-239).lua b/il_timetable/nodes/(-527,23,-239).lua new file mode 100644 index 0000000..faf5a6c --- /dev/null +++ b/il_timetable/nodes/(-527,23,-239).lua @@ -0,0 +1 @@ +if can_set_route("SpnMainInLaza", "Direct") and can_set_route("SpnMainNorthIntIn", "T3") then
set_route("SpnMainInLaza", "Direct")
else
interrupt(5, "abfahrt")
end
\ No newline at end of file diff --git a/il_timetable/nodes/(-863,14,-492).lua b/il_timetable/nodes/(-863,14,-492).lua index c78f4fb..4c650c0 100644 --- a/il_timetable/nodes/(-863,14,-492).lua +++ b/il_timetable/nodes/(-863,14,-492).lua @@ -3,7 +3,7 @@ if flip then atc_set_text_outside("E3 - Sraczka's Village\n via Trisiston") set_rc("E3_Sra") else - atc_set_text_outside("E3 - Garden of Eden Ferry\n via Trisiston") + atc_set_text_outside("E3 - Shanielle Inlet\n via Trisiston") set_rc("E3_Edf") end flip = not flip
\ No newline at end of file diff --git a/il_timetable/nodes/(-866,14,-502).lua b/il_timetable/nodes/(-866,14,-502).lua new file mode 100644 index 0000000..684dac3 --- /dev/null +++ b/il_timetable/nodes/(-866,14,-502).lua @@ -0,0 +1 @@ +atc_set_text_outside("S20 - Euler Street <-> Trap City")
\ No newline at end of file diff --git a/il_timetable/nodes/(241,13,-2039).lua b/il_timetable/nodes/(241,13,-2039).lua index a6c5cb6..5125336 100644 --- a/il_timetable/nodes/(241,13,-2039).lua +++ b/il_timetable/nodes/(241,13,-2039).lua @@ -1,2 +1,2 @@ set_line("E35") -atc_set_text_outside("Noob Express -> Melinka Town")
\ No newline at end of file +atc_set_text_outside("Noob Express -> Melinka Town -> Trisiston")
\ No newline at end of file diff --git a/nlvcross/init_code.lua b/nlvcross/init_code.lua index 6b18d77..73dabbd 100644 --- a/nlvcross/init_code.lua +++ b/nlvcross/init_code.lua @@ -1,4 +1,7 @@ F.crossings={ + BeethvV = 3, + EldersValley = 4, + AckLvcross=2, ML1_unnamed=2, ML1_Scl1=4, freightrwa = 2, @@ -49,4 +52,27 @@ if atc_arrow~=inv then setstate(cross..i, "off") end end +end + +function F.on_nt(cross, inst, inv) +if atc_arrow~=inv then + if not S.crossst[cross] then S.crossst[cross]={} end + S.crossst[cross][inst]=true + local i=1 + while is_passive(cross..i) do + setstate(cross..i, "on") + i=i+1 + end +end +end +function F.off_nt(cross, inst, inv) +if atc_arrow~=inv then + S.crossst[cross][inst]=nil + for _,_ in pairs(S.crossst[cross]) do return end + local i=1 + while is_passive(cross..i) do + setstate(cross..i, "off") + i=i+1 + end +end end
\ No newline at end of file diff --git a/nlvcross/nodes/(-2426,18,-1963).lua b/nlvcross/nodes/(-2426,18,-1963).lua new file mode 100644 index 0000000..99eb919 --- /dev/null +++ b/nlvcross/nodes/(-2426,18,-1963).lua @@ -0,0 +1 @@ +F.on("BeethvV",1)
\ No newline at end of file diff --git a/nlvcross/nodes/(-2470,18,-1912).lua b/nlvcross/nodes/(-2470,18,-1912).lua new file mode 100644 index 0000000..bec6204 --- /dev/null +++ b/nlvcross/nodes/(-2470,18,-1912).lua @@ -0,0 +1 @@ +F.off("BeethvV",2)
\ No newline at end of file diff --git a/nlvcross/nodes/(-2487,18,-1899).lua b/nlvcross/nodes/(-2487,18,-1899).lua new file mode 100644 index 0000000..b1a2339 --- /dev/null +++ b/nlvcross/nodes/(-2487,18,-1899).lua @@ -0,0 +1 @@ +F.off("BeethvV",1)
\ No newline at end of file diff --git a/nlvcross/nodes/(-2490,18,-1902).lua b/nlvcross/nodes/(-2490,18,-1902).lua new file mode 100644 index 0000000..c0f0262 --- /dev/null +++ b/nlvcross/nodes/(-2490,18,-1902).lua @@ -0,0 +1 @@ +F.on("BeethvV",2)
\ No newline at end of file diff --git a/nlvcross/nodes/(-333,19,-342).lua b/nlvcross/nodes/(-333,19,-342).lua index feadc46..cdf78c1 100644 --- a/nlvcross/nodes/(-333,19,-342).lua +++ b/nlvcross/nodes/(-333,19,-342).lua @@ -1 +1,2 @@ -F.off("MOriStn", "R2")
\ No newline at end of file +F.off("MOriStn", "R2") +F.off("MOriStn", "R2_ug")
\ No newline at end of file diff --git a/nlvcross/nodes/(-3806,8,-3238).lua b/nlvcross/nodes/(-3806,8,-3238).lua new file mode 100644 index 0000000..26b3530 --- /dev/null +++ b/nlvcross/nodes/(-3806,8,-3238).lua @@ -0,0 +1 @@ +F.on("EldersValley",1)
\ No newline at end of file diff --git a/nlvcross/nodes/(-3834,8,-3181).lua b/nlvcross/nodes/(-3834,8,-3181).lua new file mode 100644 index 0000000..74b67e9 --- /dev/null +++ b/nlvcross/nodes/(-3834,8,-3181).lua @@ -0,0 +1 @@ +F.off("EldersValley",1)
\ No newline at end of file diff --git a/nlvcross/nodes/(-3836,8,-3208).lua b/nlvcross/nodes/(-3836,8,-3208).lua new file mode 100644 index 0000000..86d3cca --- /dev/null +++ b/nlvcross/nodes/(-3836,8,-3208).lua @@ -0,0 +1 @@ +F.off("EldersValley",2)
\ No newline at end of file diff --git a/nlvcross/nodes/(-3837,8,-3179).lua b/nlvcross/nodes/(-3837,8,-3179).lua new file mode 100644 index 0000000..7325fdd --- /dev/null +++ b/nlvcross/nodes/(-3837,8,-3179).lua @@ -0,0 +1 @@ +F.on("EldersValley",2)
\ No newline at end of file diff --git a/nlvcross/nodes/(-404,12,-117).lua b/nlvcross/nodes/(-404,12,-117).lua new file mode 100644 index 0000000..088589d --- /dev/null +++ b/nlvcross/nodes/(-404,12,-117).lua @@ -0,0 +1 @@ +F.on("AckLvcross", 1)
\ No newline at end of file diff --git a/nlvcross/nodes/(-404,12,-93).lua b/nlvcross/nodes/(-404,12,-93).lua new file mode 100644 index 0000000..082f7cb --- /dev/null +++ b/nlvcross/nodes/(-404,12,-93).lua @@ -0,0 +1 @@ +F.off("AckLvcross", 1)
\ No newline at end of file diff --git a/nlvcross/nodes/(-408,12,-112).lua b/nlvcross/nodes/(-408,12,-112).lua new file mode 100644 index 0000000..d9b22d7 --- /dev/null +++ b/nlvcross/nodes/(-408,12,-112).lua @@ -0,0 +1 @@ +F.off("AckLvcross", 2)
\ No newline at end of file diff --git a/nlvcross/nodes/(-408,12,-69).lua b/nlvcross/nodes/(-408,12,-69).lua new file mode 100644 index 0000000..5194a17 --- /dev/null +++ b/nlvcross/nodes/(-408,12,-69).lua @@ -0,0 +1 @@ +F.on("AckLvcross", 2)
\ No newline at end of file diff --git a/nlvcross/nodes/(-447,5,-329).lua b/nlvcross/nodes/(-447,5,-329).lua new file mode 100644 index 0000000..f1b944b --- /dev/null +++ b/nlvcross/nodes/(-447,5,-329).lua @@ -0,0 +1 @@ +F.on("MOriStn", "R2_ug")
\ No newline at end of file diff --git a/nlvcross/nodes/(572,14,1011).lua b/nlvcross/nodes/(572,14,1011).lua index a736db4..5b08d92 100644 --- a/nlvcross/nodes/(572,14,1011).lua +++ b/nlvcross/nodes/(572,14,1011).lua @@ -1,3 +1,5 @@ -if get_line()=="E1" and get_aspect("gardonst_lvc_sig1").main.free then - F.on("gardonst","1") +if atc_id then + if get_line()=="E1" and get_aspect("gardonst_lvc_sig1").main.free then + F.on("gardonst","1") + end end
\ No newline at end of file diff --git a/nlvcross/nodes/(613,14,1011).lua b/nlvcross/nodes/(613,14,1011).lua index 019ebcd..7468080 100644 --- a/nlvcross/nodes/(613,14,1011).lua +++ b/nlvcross/nodes/(613,14,1011).lua @@ -1,3 +1,5 @@ -if get_line()=="E1" then - F.on("gardonst","1") +if atc_id then + if get_line()=="E1" then + F.on("gardonst","1") + end end
\ No newline at end of file diff --git a/subway/nodes/(-378,7,-1527).lua b/subway/nodes/(-378,7,-1527).lua new file mode 100644 index 0000000..d1dd6ee --- /dev/null +++ b/subway/nodes/(-378,7,-1527).lua @@ -0,0 +1 @@ +atc_set_text_outside("Line 7 - Birch Bay East")
\ No newline at end of file diff --git a/subway/nodes/(-617,14,-408).lua b/subway/nodes/(-617,14,-408).lua index f22552e..28145a0 100644 --- a/subway/nodes/(-617,14,-408).lua +++ b/subway/nodes/(-617,14,-408).lua @@ -1,2 +1,2 @@ -atc_set_text_outside("S12 - Ehlodex\nvia Lesnoi, Anju64, Schwarzschildt St., Gardon St.")
\ No newline at end of file +atc_set_text_outside("S12 - Ehlodex\nvia Lesnoi, Anju Crossing, Schwarzschild St., Gardon St.")
\ No newline at end of file diff --git a/subway/nodes/(-765,7,-503).lua b/subway/nodes/(-765,7,-503).lua index dedd3be..e01fd7e 100644 --- a/subway/nodes/(-765,7,-503).lua +++ b/subway/nodes/(-765,7,-503).lua @@ -1,2 +1,2 @@ -F.stn("Trp7S", "Gpl7S", "Per7S", "L") +--F.stn("Trp7S", "Gpl7S", "Per7S", "L") F.stat("Line 7", false)
\ No newline at end of file diff --git a/subway/nodes/(-973,-4,582).lua b/subway/nodes/(-973,-4,582).lua new file mode 100644 index 0000000..c67c4d5 --- /dev/null +++ b/subway/nodes/(-973,-4,582).lua @@ -0,0 +1 @@ +atc_set_text_outside("Line 7 - Planetarium")
\ No newline at end of file diff --git a/subway/nodes/(972,14,1052).lua b/subway/nodes/(972,14,1052).lua new file mode 100644 index 0000000..bf0517b --- /dev/null +++ b/subway/nodes/(972,14,1052).lua @@ -0,0 +1 @@ +atc_set_text_outside("S12 - Spawn\nvia Gardon St., Schwarzschild St., Anju Crossing, Lesnoi")
\ No newline at end of file |