diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:52:07 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:52:07 +0200 |
commit | c21692e0a830e434675014dd7b54736d180ce71d (patch) | |
tree | e928ac06b872bb5fa7697736f8cb78873e1424d2 /Crossroads/nodes | |
parent | c6612d4e4b59a03d097a494eee4c714f8b88f123 (diff) | |
download | luaatc_envs-c21692e0a830e434675014dd7b54736d180ce71d.tar.gz luaatc_envs-c21692e0a830e434675014dd7b54736d180ce71d.tar.bz2 luaatc_envs-c21692e0a830e434675014dd7b54736d180ce71d.zip |
State at 2020-06-24
Diffstat (limited to 'Crossroads/nodes')
77 files changed, 117 insertions, 67 deletions
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 |