diff options
225 files changed, 1523 insertions, 225 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"}]] }, diff --git a/Crossroads/nodes/(1112,10,2629).lua b/Crossroads/nodes/(1112,10,2629).lua new file mode 100644 index 0000000..51a8690 --- /dev/null +++ b/Crossroads/nodes/(1112,10,2629).lua @@ -0,0 +1 @@ +F.stn2gen("phsc", "3", "L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1112,10,2635).lua b/Crossroads/nodes/(1112,10,2635).lua deleted file mode 100644 index 2333864..0000000 --- a/Crossroads/nodes/(1112,10,2635).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("phsc","S","L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1119,16,2757).lua b/Crossroads/nodes/(1119,16,2753).lua index dde01ed..dde01ed 100644 --- a/Crossroads/nodes/(1119,16,2757).lua +++ b/Crossroads/nodes/(1119,16,2753).lua diff --git a/Crossroads/nodes/(1122,10,2639).lua b/Crossroads/nodes/(1122,10,2639).lua deleted file mode 100644 index 5d35b02..0000000 --- a/Crossroads/nodes/(1122,10,2639).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("phsc", "N", "L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1122,10,2645).lua b/Crossroads/nodes/(1122,10,2645).lua new file mode 100644 index 0000000..2d79a8d --- /dev/null +++ b/Crossroads/nodes/(1122,10,2645).lua @@ -0,0 +1 @@ +F.stn2gen("phsc", "4", "L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1299,8,978).lua b/Crossroads/nodes/(1299,8,978).lua new file mode 100644 index 0000000..ec79ea5 --- /dev/null +++ b/Crossroads/nodes/(1299,8,978).lua @@ -0,0 +1 @@ +F.stn2gen("sce", "1", "R", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1310,8,975).lua b/Crossroads/nodes/(1310,8,975).lua new file mode 100644 index 0000000..f5a31b7 --- /dev/null +++ b/Crossroads/nodes/(1310,8,975).lua @@ -0,0 +1 @@ +F.stn2gen("sce", "2", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1637,-6,919).lua b/Crossroads/nodes/(1637,-6,919).lua new file mode 100644 index 0000000..f43bd43 --- /dev/null +++ b/Crossroads/nodes/(1637,-6,919).lua @@ -0,0 +1 @@ +F.stn2gen("cr", "34", "L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1645,-6,919).lua b/Crossroads/nodes/(1645,-6,919).lua new file mode 100644 index 0000000..7c7f66b --- /dev/null +++ b/Crossroads/nodes/(1645,-6,919).lua @@ -0,0 +1 @@ +F.stn2gen("cr", "33", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1648,-6,944).lua b/Crossroads/nodes/(1648,-6,944).lua new file mode 100644 index 0000000..0da0573 --- /dev/null +++ b/Crossroads/nodes/(1648,-6,944).lua @@ -0,0 +1 @@ +F.stn2gen("cr", "32", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1656,-6,944).lua b/Crossroads/nodes/(1656,-6,944).lua new file mode 100644 index 0000000..4a14c98 --- /dev/null +++ b/Crossroads/nodes/(1656,-6,944).lua @@ -0,0 +1 @@ +F.stn2gen("cr", "31", "L")
\ No newline at end of file diff --git a/Crossroads/nodes/(1671,7,990).lua b/Crossroads/nodes/(1671,7,990).lua deleted file mode 100644 index 839b9ed..0000000 --- a/Crossroads/nodes/(1671,7,990).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crsmacker", "R3", "L", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1703,10,781).lua b/Crossroads/nodes/(1703,10,781).lua deleted file mode 100644 index 1bb93e8..0000000 --- a/Crossroads/nodes/(1703,10,781).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crsfterm", "4S", "L", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1709,10,781).lua b/Crossroads/nodes/(1709,10,781).lua deleted file mode 100644 index b7b00f7..0000000 --- a/Crossroads/nodes/(1709,10,781).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crsfterm", "3S", "R", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1717,10,781).lua b/Crossroads/nodes/(1717,10,781).lua deleted file mode 100644 index 723ad70..0000000 --- a/Crossroads/nodes/(1717,10,781).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crsfterm", "2S", "L", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1723,10,781).lua b/Crossroads/nodes/(1723,10,781).lua deleted file mode 100644 index 889bdc3..0000000 --- a/Crossroads/nodes/(1723,10,781).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crsfterm", "1S", "R", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1723,10,790).lua b/Crossroads/nodes/(1723,10,790).lua deleted file mode 100644 index 10cf496..0000000 --- a/Crossroads/nodes/(1723,10,790).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crsfterm", "1N", "L", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1757,-1,673).lua b/Crossroads/nodes/(1757,-1,673).lua new file mode 100644 index 0000000..58e48bb --- /dev/null +++ b/Crossroads/nodes/(1757,-1,673).lua @@ -0,0 +1 @@ +F.stn2gen("cra", "1", "L", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1763,20,996).lua b/Crossroads/nodes/(1763,20,996).lua new file mode 100644 index 0000000..17833ac --- /dev/null +++ b/Crossroads/nodes/(1763,20,996).lua @@ -0,0 +1,5 @@ +if atc_arrow then + if get_line() == "ABE" then + set_line("AB") + end +end
\ No newline at end of file diff --git a/Crossroads/nodes/(1768,10,598).lua b/Crossroads/nodes/(1768,10,598).lua deleted file mode 100644 index 0c03cf2..0000000 --- a/Crossroads/nodes/(1768,10,598).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_8_1","W","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1769,10,652).lua b/Crossroads/nodes/(1769,10,652).lua deleted file mode 100644 index 4f300b4..0000000 --- a/Crossroads/nodes/(1769,10,652).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_7_1","W","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1771,10,595).lua b/Crossroads/nodes/(1771,10,595).lua deleted file mode 100644 index b7c3277..0000000 --- a/Crossroads/nodes/(1771,10,595).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_8_1","E","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1772,10,649).lua b/Crossroads/nodes/(1772,10,649).lua deleted file mode 100644 index 9582a24..0000000 --- a/Crossroads/nodes/(1772,10,649).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_7_1","E","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1791,-6,1007).lua b/Crossroads/nodes/(1791,-6,1007).lua deleted file mode 100644 index 6c812ee..0000000 --- a/Crossroads/nodes/(1791,-6,1007).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crch", "11", "L", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1843,10,598).lua b/Crossroads/nodes/(1843,10,598).lua deleted file mode 100644 index 3a4baa9..0000000 --- a/Crossroads/nodes/(1843,10,598).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_8_3","W","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1843,10,652).lua b/Crossroads/nodes/(1843,10,652).lua deleted file mode 100644 index 6804b79..0000000 --- a/Crossroads/nodes/(1843,10,652).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_7_3","W","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1844,20,598).lua b/Crossroads/nodes/(1844,20,598).lua deleted file mode 100644 index d7639dc..0000000 --- a/Crossroads/nodes/(1844,20,598).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_8_3", "N", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1844,20,652).lua b/Crossroads/nodes/(1844,20,652).lua deleted file mode 100644 index 1b25106..0000000 --- a/Crossroads/nodes/(1844,20,652).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_7_3", "N", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1844,20,706).lua b/Crossroads/nodes/(1844,20,706).lua deleted file mode 100644 index 382af54..0000000 --- a/Crossroads/nodes/(1844,20,706).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_6_3", "N", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1844,20,760).lua b/Crossroads/nodes/(1844,20,760).lua deleted file mode 100644 index 589b926..0000000 --- a/Crossroads/nodes/(1844,20,760).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_5_3", "N", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1846,10,595).lua b/Crossroads/nodes/(1846,10,595).lua deleted file mode 100644 index a395405..0000000 --- a/Crossroads/nodes/(1846,10,595).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_8_3","E","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1846,10,649).lua b/Crossroads/nodes/(1846,10,649).lua deleted file mode 100644 index af71d24..0000000 --- a/Crossroads/nodes/(1846,10,649).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_7_3","E","R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1918,20,595).lua b/Crossroads/nodes/(1918,20,595).lua deleted file mode 100644 index 6238bef..0000000 --- a/Crossroads/nodes/(1918,20,595).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_8_5", "S", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1918,20,649).lua b/Crossroads/nodes/(1918,20,649).lua deleted file mode 100644 index 7ec3101..0000000 --- a/Crossroads/nodes/(1918,20,649).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_7_5", "S", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1918,20,703).lua b/Crossroads/nodes/(1918,20,703).lua deleted file mode 100644 index 4e69e03..0000000 --- a/Crossroads/nodes/(1918,20,703).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_6_5", "S", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1918,20,757).lua b/Crossroads/nodes/(1918,20,757).lua deleted file mode 100644 index 3e4fbcf..0000000 --- a/Crossroads/nodes/(1918,20,757).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_5_5", "S", "R")
\ No newline at end of file diff --git a/Crossroads/nodes/(1919,10,595).lua b/Crossroads/nodes/(1919,10,595).lua deleted file mode 100644 index e377074..0000000 --- a/Crossroads/nodes/(1919,10,595).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_8_5","W","R",true,true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1919,10,649).lua b/Crossroads/nodes/(1919,10,649).lua deleted file mode 100644 index a4a5cab..0000000 --- a/Crossroads/nodes/(1919,10,649).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_7_5","W","R", true, true)
\ No newline at end of file diff --git a/Crossroads/nodes/(1919,10,703).lua b/Crossroads/nodes/(1919,10,703).lua deleted file mode 100644 index 2bb729b..0000000 --- a/Crossroads/nodes/(1919,10,703).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn2gen("crs_6_5","W","R",true,true)
\ No newline at end of file diff --git a/Crossroads/nodes/(2284,-6,978).lua b/Crossroads/nodes/(2284,-6,978).lua new file mode 100644 index 0000000..cef4930 --- /dev/null +++ b/Crossroads/nodes/(2284,-6,978).lua @@ -0,0 +1 @@ +F.stn2gen("crne", "3", "R", true, true)
\ No newline at end of file diff --git a/auto_yards/init_code.lua b/auto_yards/init_code.lua index f3b4282..3d442bc 100644 --- a/auto_yards/init_code.lua +++ b/auto_yards/init_code.lua @@ -86,8 +86,9 @@ if event.init then S.known_trains = { ['120684'] = "LHF #1", --Maverick2797 ['249165'] = "LHF #2", --Maverick2797 - ['734206'] = "ARC-BY", --Maverick2797 + ['368003'] = "ARC-BY", --Maverick2797 ['588750'] = "MMF-TY", --survivalg/erstazi + ['879136'] = "ERS-SNS", --erstazi ['543381'] = "WOA-IP", --Maverick2797 ['834721'] = "S27-ARC", --Maverick2797 ['513598'] = "S27EX-ARC", --Maverick2797 diff --git a/auto_yards/nodes/(-1933,16,806).lua b/auto_yards/nodes/(-1932,16,807).lua index 4503e25..4503e25 100644 --- a/auto_yards/nodes/(-1933,16,806).lua +++ b/auto_yards/nodes/(-1932,16,807).lua diff --git a/auto_yards/nodes/(-1938,16,805).lua b/auto_yards/nodes/(-1937,16,806).lua index 4503e25..4503e25 100644 --- a/auto_yards/nodes/(-1938,16,805).lua +++ b/auto_yards/nodes/(-1937,16,806).lua diff --git a/auto_yards/nodes/(-1946,16,801).lua b/auto_yards/nodes/(-1945,16,802).lua index 4503e25..4503e25 100644 --- a/auto_yards/nodes/(-1946,16,801).lua +++ b/auto_yards/nodes/(-1945,16,802).lua diff --git a/auto_yards/nodes/(-1947,16,837).lua b/auto_yards/nodes/(-1947,16,837).lua index 0a82dfd..5e2841b 100644 --- a/auto_yards/nodes/(-1947,16,837).lua +++ b/auto_yards/nodes/(-1947,16,837).lua @@ -1,2 +1,2 @@ -S.yards.ARC.notify = {['S27_EXPORT'] = true} +S.yards.ARC.notify = {['S27'] = true} print(S.yards.ARC.notify)
\ No newline at end of file diff --git a/auto_yards/nodes/(-1954,16,797).lua b/auto_yards/nodes/(-1953,16,798).lua index 4503e25..4503e25 100644 --- a/auto_yards/nodes/(-1954,16,797).lua +++ b/auto_yards/nodes/(-1953,16,798).lua diff --git a/auto_yards/nodes/(-2004,2,-1101).lua b/auto_yards/nodes/(-2004,2,-1101).lua index c0d57ae..031f395 100644 --- a/auto_yards/nodes/(-2004,2,-1101).lua +++ b/auto_yards/nodes/(-2004,2,-1101).lua @@ -10,6 +10,7 @@ local subs = { ]]-- ['ARC'] = {['pos'] = POS(-1973,16,800), ['msg'] = "notify"}, + ['NOID'] = {['pos'] = POS(-2204,8,-676), ['msg'] = "notify"}, } if event.ext_int or event.punch then diff --git a/auto_yards/nodes/(-2029,19,733).lua b/auto_yards/nodes/(-2029,19,733).lua index f88c9f0..afbb94b 100644 --- a/auto_yards/nodes/(-2029,19,733).lua +++ b/auto_yards/nodes/(-2029,19,733).lua @@ -1,14 +1,37 @@ local yard_id = "ARC" + +__approach_callback_mode = 1 +if event.approach and not event.has_entered then --disable ARS for all approaching trains + atc_set_ars_disable(true) + atc_set_lzb_tsr(1) + return +end + if event.train then + if F.has_rc("ARC_YARD_REENTRY") then -- loco will use S23-S approach track as headshunt and re-enter yard -- RC will be removed by the headshunt controller (req to trigger it) -- manually set the route here before ARS has a chance set_route(POS(-2033,21,731),"Yard Reentry (LENGTH LIMIT)") - -- defer re-enabling ARS to ensure the route has been accepted, if not set + F.indicator(S.yards[yard_id].active_indicator_pos,false) + + -- Extract the second exit director from ARC_2nd_EXIT_x and insert if available + -- should be safe to add it now as the route has already been set to reenter the yard first + local rc = F.get_rc_safe():match("ARC_2ND_EXIT_(%S+)") + print("Second Exit RC: "..tostring(rc)) + if rc then + F.remove_rc_match("ARC_2ND_EXIT_%S+") + F.add_rc(rc) + print(F.get_rc_safe()) + end + + -- defer re-enabling ARS to ensure the route has been accepted, or at least queued atc_send("S4D1A1") - return + return end + + -- disregard light exit locos if F.has_rc(yard_id.."_LIGHT_EXIT") then F.remove_rc(yard_id.."_LIGHT_EXIT") atc_set_ars_disable(false) diff --git a/auto_yards/nodes/(-2042,19,723).lua b/auto_yards/nodes/(-2042,19,723).lua new file mode 100644 index 0000000..a0d12bd --- /dev/null +++ b/auto_yards/nodes/(-2042,19,723).lua @@ -0,0 +1,8 @@ +if event.train and atc_arrow then + F.remove_rc_match("ARC_LOCOS_%S+") + F.remove_rc_match("ARC_WAGONS_%S+") + F.remove_rc({ + "ARC_DEPART", + "ARC_FINAL_COLLECT" + }) +end
\ No newline at end of file diff --git a/auto_yards/nodes/(771,14,-16).lua b/auto_yards/nodes/(771,14,-16).lua new file mode 100644 index 0000000..447dce1 --- /dev/null +++ b/auto_yards/nodes/(771,14,-16).lua @@ -0,0 +1,55 @@ +--leekston collection controller +local up_dir = "North" +local down_dir = "South" +local up_dir_indicator = POS(771,13,-14) +local down_dir_indicator = POS(771,13,-15) +local exit_indicator_pos = POS(771,13,-18) + +local userlist = { + "Maverick2797", + "mary4" +} + +if event.ext_int then --to be pinged by the departing LHF train only + local dir + if F.indicator(exit_indicator_pos) then + F.indicator(up_dir_indicator, false) + dir = up_dir + else + F.indicator(down_dir_indicator, false) + dir = down_dir + end + digiline_send("lcd",string.format("%s | Train collected and departed %sbound",rwt.to_string(rwt.now()), dir)) + return +end + +--confirm user is actually allowed to use this system +local permitted_user = false +for _,name in pairs(userlist) do + if name == event.name then + permitted_user = name + break + end +end +if not permitted_user then + digiline_send("lcd","User is not permitted to use this. Contact a moderator") + return +end + +local dir = "" +--cycle through the departure options +if F.indicator(up_dir_indicator) then + F.indicator(up_dir_indicator, false) + F.indicator(down_dir_indicator, true) + dir = down_dir.."bound" +elseif F.indicator(down_dir_indicator) then + F.indicator(up_dir_indicator, false) + F.indicator(down_dir_indicator, false) + dir = "Disabled" +else + F.indicator(up_dir_indicator, true) + F.indicator(down_dir_indicator, false) + dir = up_dir.."bound" +end + +digiline_send("lcd",string.format("%s\nCollection %s.\nUser %s", rwt.to_string(rwt.now()), dir, event.name))
\ No newline at end of file diff --git a/auto_yards/nodes/(775,13,-20).lua b/auto_yards/nodes/(775,13,-20).lua new file mode 100644 index 0000000..8cd2bb9 --- /dev/null +++ b/auto_yards/nodes/(775,13,-20).lua @@ -0,0 +1 @@ +interrupt_pos(POS(771,14,-16))
\ No newline at end of file diff --git a/auto_yards/nodes/(783,10,-57).lua b/auto_yards/nodes/(783,10,-57).lua new file mode 100644 index 0000000..e56cc30 --- /dev/null +++ b/auto_yards/nodes/(783,10,-57).lua @@ -0,0 +1,2 @@ +if not F.has_rc("LEEK_EXIT") then return end +-- remove any extra yard RCs here
\ No newline at end of file diff --git a/auto_yards/nodes/(785,10,40).lua b/auto_yards/nodes/(785,10,40).lua new file mode 100644 index 0000000..e56cc30 --- /dev/null +++ b/auto_yards/nodes/(785,10,40).lua @@ -0,0 +1,2 @@ +if not F.has_rc("LEEK_EXIT") then return end +-- remove any extra yard RCs here
\ No newline at end of file diff --git a/auto_yards/nodes/(789,10,-31).lua b/auto_yards/nodes/(789,10,-31).lua new file mode 100644 index 0000000..e877483 --- /dev/null +++ b/auto_yards/nodes/(789,10,-31).lua @@ -0,0 +1 @@ +-- arrival, dir = false
\ No newline at end of file diff --git a/auto_yards/nodes/(789,10,13).lua b/auto_yards/nodes/(789,10,13).lua new file mode 100644 index 0000000..4d16159 --- /dev/null +++ b/auto_yards/nodes/(789,10,13).lua @@ -0,0 +1 @@ +-- arrival, dir = true
\ No newline at end of file diff --git a/auto_yards/nodes/(792,10,-31).lua b/auto_yards/nodes/(792,10,-31).lua new file mode 100644 index 0000000..fa98cc9 --- /dev/null +++ b/auto_yards/nodes/(792,10,-31).lua @@ -0,0 +1 @@ +-- continue onwards
\ No newline at end of file diff --git a/auto_yards/nodes/(792,10,11).lua b/auto_yards/nodes/(792,10,11).lua new file mode 100644 index 0000000..ece3c16 --- /dev/null +++ b/auto_yards/nodes/(792,10,11).lua @@ -0,0 +1 @@ +-- continue northwards
\ No newline at end of file diff --git a/auto_yards/nodes/(794,10,31).lua b/auto_yards/nodes/(794,10,31).lua new file mode 100644 index 0000000..f7e80a9 --- /dev/null +++ b/auto_yards/nodes/(794,10,31).lua @@ -0,0 +1,46 @@ +-- Automatic bouncer for headshunts, assuming longer headshunt than train length. Arrow points into headshunt +local rev_rc = "LEEK_HS_north" +local rm_rc = true +local autocouple = nil +local rm_cpl_rc = true + +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + if not F.has_rc(rev_rc) then return end + atc_set_lzb_tsr(3) + atc_set_ars_disable(true) + return +end + +if event.train then + if not atc_arrow then --train has bounced + if F.has_rc(autocouple) then + atc_send("CplS0WD2S1") + if rm_cpl_rc then F.remove_rc({autocouple}) end + end + return + end + + if not F.has_rc(rev_rc) then --not our train. disregard + atc_set_ars_disable(false) + return + end + atc_send("S3") + if rm_rc then F.remove_rc({rev_rc}) end + schedule_in(";01",atc_id) + return +end + +if event.schedule then + if not atc_id then --bounce the train that just passed + atc_send_to_train(event.msg,"B0WRD1A1S3") + else + if atc_id == event.msg then --train hasn't fully passed yet, wait a bit longer + schedule_in(";01",atc_id) + else -- somehow another train crossed the controller before the first one returned. Unlikely but possible + atc_send_to_train(event.msg,"BBOL") + atc_send("BBOL") + end + end +end
\ No newline at end of file diff --git a/auto_yards/nodes/(796,10,-39).lua b/auto_yards/nodes/(796,10,-39).lua new file mode 100644 index 0000000..265c211 --- /dev/null +++ b/auto_yards/nodes/(796,10,-39).lua @@ -0,0 +1 @@ +-- collection track (controlled by tower UI)
\ No newline at end of file diff --git a/auto_yards/nodes/(796,10,-54).lua b/auto_yards/nodes/(796,10,-54).lua new file mode 100644 index 0000000..a3f3e42 --- /dev/null +++ b/auto_yards/nodes/(796,10,-54).lua @@ -0,0 +1,46 @@ +-- Automatic bouncer for headshunts, assuming longer headshunt than train length. Arrow points into headshunt +local rev_rc = "LEEK_HS_south" +local rm_rc = true +local autocouple = nil +local rm_cpl_rc = true + +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + if not F.has_rc(rev_rc) then return end + atc_set_lzb_tsr(3) + atc_set_ars_disable(true) + return +end + +if event.train then + if not atc_arrow then --train has bounced + if F.has_rc(autocouple) then + atc_send("CplS0WD2S1") + if rm_cpl_rc then F.remove_rc({autocouple}) end + end + return + end + + if not F.has_rc(rev_rc) then --not our train. disregard + atc_set_ars_disable(false) + return + end + atc_send("S3") + if rm_rc then F.remove_rc({rev_rc}) end + schedule_in(";01",atc_id) + return +end + +if event.schedule then + if not atc_id then --bounce the train that just passed + atc_send_to_train(event.msg,"B0WRD1A1S3") + else + if atc_id == event.msg then --train hasn't fully passed yet, wait a bit longer + schedule_in(";01",atc_id) + else -- somehow another train crossed the controller before the first one returned. Unlikely but possible + atc_send_to_train(event.msg,"BBOL") + atc_send("BBOL") + end + end +end
\ No newline at end of file diff --git a/auto_yards/nodes/(796,10,3).lua b/auto_yards/nodes/(796,10,3).lua new file mode 100644 index 0000000..265c211 --- /dev/null +++ b/auto_yards/nodes/(796,10,3).lua @@ -0,0 +1 @@ +-- collection track (controlled by tower UI)
\ No newline at end of file diff --git a/auto_yards/nodes/(799,10,-37).lua b/auto_yards/nodes/(799,10,-37).lua new file mode 100644 index 0000000..1db4581 --- /dev/null +++ b/auto_yards/nodes/(799,10,-37).lua @@ -0,0 +1 @@ +-- drop off here from LFH
\ No newline at end of file diff --git a/auto_yards/nodes/(799,10,3).lua b/auto_yards/nodes/(799,10,3).lua new file mode 100644 index 0000000..1db4581 --- /dev/null +++ b/auto_yards/nodes/(799,10,3).lua @@ -0,0 +1 @@ +-- drop off here from LFH
\ No newline at end of file diff --git a/durt/init_code.lua b/durt/init_code.lua index cf4207c..291285a 100644 --- a/durt/init_code.lua +++ b/durt/init_code.lua @@ -1,9 +1,5 @@ --[[ Misc Code ]]-- -S.runarounds = { - ["M27_Breaker_Factory"] = {}, - ["DJnc_4"] = {}, -} if event.init then local list_of_yards = { ["WOA"] = {}, diff --git a/durt/nodes/(-1476,11,-2588).lua b/durt/nodes/(-1476,11,-2588).lua index 2701812..7c1c1d0 100644 --- a/durt/nodes/(-1476,11,-2588).lua +++ b/durt/nodes/(-1476,11,-2588).lua @@ -1,6 +1,6 @@ __approach_callback_mode = 1 -if event.approach and not event.has_entered then +if event.approach then atc_set_ars_disable(true) atc_set_lzb_tsr(1) end diff --git a/durt/nodes/(-1501,11,-2588).lua b/durt/nodes/(-1501,11,-2588).lua index 2701812..7c1c1d0 100644 --- a/durt/nodes/(-1501,11,-2588).lua +++ b/durt/nodes/(-1501,11,-2588).lua @@ -1,6 +1,6 @@ __approach_callback_mode = 1 -if event.approach and not event.has_entered then +if event.approach then atc_set_ars_disable(true) atc_set_lzb_tsr(1) end diff --git a/durt/nodes/(-1973,16,800).lua b/durt/nodes/(-1973,16,800).lua index 5456ccc..0e7e05c 100644 --- a/durt/nodes/(-1973,16,800).lua +++ b/durt/nodes/(-1973,16,800).lua @@ -6,8 +6,9 @@ local sections ={ store_4 = "032832" -- Destined for Arcadius Basement Loading Dock } local function send_train() - atc_send("S0WRD2A1S4") - local cmd = { -- collect wagons from BYARD, and park loco in loco siding if no departures at ARC + -- define default command to be overwritten if departures/local job available + -- collect wagons from BYARD, and park loco in loco siding if no departures at ARC + local cmd = { "FREIGHT", "ARC_LOCOSTORE", "ARC_AUTO", @@ -22,27 +23,28 @@ local function send_train() "ARC_LIGHT_EXIT" } if #section_occupancy(sections.store_4) > 0 then - if print_notification then print(rwt.to_string(rwt.now()).. " "..notification_id.." send_train() has local job from STORE_4") end -- perform local job to Arcadius Basement Loading Dock before taking wagons to BYARD + if print_notification then print(rwt.to_string(rwt.now()).. " "..notification_id.." send_train() has local job from STORE_4") end cmd = { - "FREIGHT", --because it's freight - "ARC_LOCOSTORE", --technically the loco identifier until we have wagon ID. will be ignored by yard_headshunt because no "ARC_DEPART" etc - "ARC_YARD_REENTRY", --redirect back into the yard from yard_exit controller. will be checked by yard_exit before ARS triggers - "ARC_RTS", --basic yard call - "ARC_COLLECT_ARC_LOAD_DOCK", -- collect req wagons. can be left in place, if train_length == 1 then will return to siding anyway - "ARC_AUTO_LOCAL_LOADING", --direct to ARC Basement Loading Dock - "ARC_LOAD", --trigger the loading track + "FREIGHT", --because it's freight + "ARC_LOCOSTORE", --technically the loco identifier until we have wagon ID. will be ignored by yard_headshunt because no "ARC_DEPART" etc + "ARC_YARD_REENTRY", --redirect back into the yard from yard_exit controller. will be checked by yard_exit before ARS triggers + "ARC_RTS", --basic yard call + "ARC_COLLECT_ARC_LOAD_DOCK", -- collect req wagons. can be left in place, if train_length == 1 then will return to siding anyway + "ARC_AUTO_LOCAL_LOADING", --direct to ARC Basement Loading Dock + "ARC_LOAD", --trigger the loading track } elseif #section_occupancy(sections.departures) > 0 then - if print_notification then print(rwt.to_string(rwt.now()).. " "..notification_id.." send_train() has local job from STORE_4") end - cmd = { -- collect wagons from BYARD, and park loco in loco siding if no departures at ARC + -- reenter yard, collect departures and head to Byard + if print_notification then print(rwt.to_string(rwt.now()).. " "..notification_id.." send_train() has local job from DEPARTURES") end + cmd = { "FREIGHT", "ARC_LOCOSTORE", "ARC_AUTO", + "ARC_YARD_REENTRY", -- trigger yard reentry on light exit + "ARC_2ND_EXIT_ARC_AUTO_S23S", -- exit direction after "ARC_RTS", "ARC_COLLECT_ARC_SB", - "ARC_YARD_REENTRY", - "ARC_2ND_EXIT_ARC_AUTO_S23S", "S23E3N", "BYARD", "BY_RTS", diff --git a/durt/nodes/(-2039,19,719).lua b/durt/nodes/(-2039,19,719).lua index 107d03f..5a090ad 100644 --- a/durt/nodes/(-2039,19,719).lua +++ b/durt/nodes/(-2039,19,719).lua @@ -28,6 +28,15 @@ if event.train then end if rm_rc then F.remove_rc({rev_rc}) end schedule_in(";01",atc_id) + + -- remove stray control flags + F.remove_rc_match("ARC_LOCOS_%S+") + F.remove_rc_match("ARC_WAGONS_%S+") + F.remove_rc({ + "ARC_DEPART", + "ARC_FINAL_COLLECT" + }) + return end diff --git a/durt/nodes/(-2204,8,-651).lua b/durt/nodes/(-2204,8,-651).lua new file mode 100644 index 0000000..d8539fb --- /dev/null +++ b/durt/nodes/(-2204,8,-651).lua @@ -0,0 +1,26 @@ +local cmd = { + "TREES_RUNAROUND", + "SHUNT_MAINLINE_REV", +} +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + atc_set_ars_disable(true) + atc_set_lzb_tsr(1) + return +end + +if event.train and atc_arrow then + if not F.has_rc("BYARD_NOID_SHUTTLE") then return end -- not our train, disregard + if not F.has_rc("TREES_RUNAROUND") then -- train has arrived from yard, split and runaround + split_off_locomotive("A0B0") --disable ARS to stop the rest of the train engaging the signal + F.add_rc(cmd) --add RC commands tomake the train runaround + atc_send("S3A1") --send the loco on its way to make the runaround + return + end + --else loco has returned from runaround + F.remove_rc(cmd) -- remove runaround RCs + atc_send("S0WRS1") --reverse the train and creep towards the other departure signal + return +end +
\ No newline at end of file diff --git a/durt/nodes/(-2204,8,-676).lua b/durt/nodes/(-2204,8,-676).lua new file mode 100644 index 0000000..834ba6c --- /dev/null +++ b/durt/nodes/(-2204,8,-676).lua @@ -0,0 +1,30 @@ +local notification_id = "NOID" +local ind = POS(-2209,8,-651) -- IMPORTANT NB: remember to update this if you move the indicator mesecon switch +local print_notification = true +local function send_train() + set_rc("FREIGHT BYARD_NOID_SHUTTLE BYARD BY_COLLECT_NOID BY_RTS NIDTH NOIDEA IND TREES") -- RC string to overwrite when departing for the autoyard, remember to include the return RCs as well + step_fc() --step the fc forward to be ready for the autoyard + atc_send("A1SM") + F.indicator(ind,false) +end +if event.ext_int then -- trigger event from the yard itself. + if event.message == "notify" then -- can also be a manual/other message, just edit this if statement + if print_notification then print(rwt.to_string(rwt.now()).. " "..notification_id.." RX Notification") end + if F.indicator(ind) then return end -- indicator is already lit, train hasn't collected the first set yet + if atc_id then --send the train to the yard for collection + send_train() + return + else -- set the indicator to await the returning train + F.indicator(ind,true) + return + end + end +end +if event.train and atc_arrow then + if F.indicator(ind) then + send_train() + return + end + atc_send("B0") + return +end
\ No newline at end of file diff --git a/durt/nodes/(-2209,9,-651).lua b/durt/nodes/(-2209,9,-651).lua new file mode 100644 index 0000000..fdf1611 --- /dev/null +++ b/durt/nodes/(-2209,9,-651).lua @@ -0,0 +1,10 @@ +local users = { +"gabriel", +"survivalg", +"Maverick2797" +} +if event.punch then + for _,name in pairs(users) do + if event.name==name then interrupt_pos(POS(-2204,8,-676),"notify") return end + end +end
\ No newline at end of file diff --git a/durt/nodes/(-2213,10,-728).lua b/durt/nodes/(-2213,10,-728).lua new file mode 100644 index 0000000..23ac35d --- /dev/null +++ b/durt/nodes/(-2213,10,-728).lua @@ -0,0 +1,2 @@ +if not F.has_rc("TREES_RUNAROUND") then return end +atc_send("CplS1")
\ No newline at end of file diff --git a/durt/nodes/(-3593,19,-3930).lua b/durt/nodes/(-3593,19,-3930).lua deleted file mode 100644 index b3993db..0000000 --- a/durt/nodes/(-3593,19,-3930).lua +++ /dev/null @@ -1,2 +0,0 @@ -do return end -local id = "DJnc_4" --change here
if (event.train and atc_arrow) then
setstate(POS(-3596,18,-3927),"st")
if not S.runarounds[id].active then
S.runarounds[id].active = true
atc_set_text_outside("Please Wait\nTrain Changing Ends") --change here
split_off_locomotive("B0WROL")
set_autocouple()
set_rc("runaround") --change here
return
else
S.runarounds[id].active = nil
atc_send("OCB0WRD1SM")
set_rc("sfh_service") --change here
atc_set_text_outside("Sulfur Hills Branch Line -> Sulfur Hills")
set_line("SHBL")
unset_autocouple()
setstate(POS(-3596,18,-3945),"st")
end
end
\ No newline at end of file diff --git a/durt/nodes/(-3596,18,-3920).lua b/durt/nodes/(-3596,18,-3920).lua deleted file mode 100644 index 19149fe..0000000 --- a/durt/nodes/(-3596,18,-3920).lua +++ /dev/null @@ -1,2 +0,0 @@ -do return end -if (event.train and atc_arrow) then
setstate(POS(-3596,18,-3927),"cr")
setstate(POS(-3599,18,-3951),"cr")
atc_send("B0WRD2S4")
end
\ No newline at end of file diff --git a/durt/nodes/(-3597,18,-3926).lua b/durt/nodes/(-3597,18,-3926).lua new file mode 100644 index 0000000..badf4a5 --- /dev/null +++ b/durt/nodes/(-3597,18,-3926).lua @@ -0,0 +1,28 @@ +-- DJNC Runaround +local rejoin_rc = "DJNC_REJOIN" +local runaround_cmd = { + "DJNC_RUNAROUND", --HS_Up access, runaround + "DJNC_HS_D", -- HS_Down access + "DJNC_HS_D_CPL", -- recouple in Up Direction + rejoin_rc -- Up rejoin director +} +__approach_callback_mode = 1 +if event.approach and not event.has_entered then + if not F.has_rc("SFHB") then return end + atc_set_text_inside("Next Station: Desert Junction\nService Terminates Here\nChange Here For Noob Express") + atc_set_lzb_tsr(1) + return +end +if event.train then + if not get_line() == "SFHB" then return end + if not F.has_rc(rejoin_rc) then --train has arrived. Split and run around + atc_set_text_inside("Desert Junction\nService Terminates Here\nChange Here For Noob Express") + split_off_locomotive("A0S0OL") + F.add_rc(runaround_cmd) + return + end + F.remove_rc(runaround_cmd) + atc_send("OCS0WRD5SM") + atc_set_text_inside("") + return +end
\ No newline at end of file diff --git a/durt/nodes/(-3602,18,-3962).lua b/durt/nodes/(-3602,18,-3962).lua new file mode 100644 index 0000000..f731225 --- /dev/null +++ b/durt/nodes/(-3602,18,-3962).lua @@ -0,0 +1,46 @@ +-- Automatic bouncer for headshunts, assuming longer headshunt than train length. Arrow points into headshunt +local rev_rc = "DJNC_HS_D" +local rm_rc = true +local autocouple = "DJNC_HS_D_CPL" +local rm_cpl_rc = true + +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + if not F.has_rc(rev_rc) then return end + atc_set_lzb_tsr(3) + atc_set_ars_disable(true) + return +end + +if event.train then + if not atc_arrow then --train has bounced + if F.has_rc(autocouple) then + atc_send("CplS0WD2S1") + if rm_cpl_rc then F.remove_rc({autocouple}) end + end + return + end + + if not F.has_rc(rev_rc) then --not our train. disregard + atc_set_ars_disable(false) + return + end + F.remove_rc("DJNC_RUNAROUND") + if rm_rc then F.remove_rc({rev_rc}) end + schedule_in(";01",atc_id) + return +end + +if event.schedule then + if not atc_id then --bounce the train that just passed + atc_send_to_train(event.msg,"B0WRD1A1S3") + else + if atc_id == event.msg then --train hasn't fully passed yet, wait a bit longer + schedule_in(";01",atc_id) + else -- somehow another train crossed the controller before the first one returned. Unlikely but possible + atc_send_to_train(event.msg,"BBOL") + atc_send("BBOL") + end + end +end
\ No newline at end of file diff --git a/durt/nodes/(-3604,18,-3958).lua b/durt/nodes/(-3604,18,-3958).lua deleted file mode 100644 index fa7c445..0000000 --- a/durt/nodes/(-3604,18,-3958).lua +++ /dev/null @@ -1 +0,0 @@ -if (event.train and atc_arrow) then
setstate(POS(-3599,18,-3951),"st")
setstate(POS(-3596,18,-3945),"cr")
atc_send("B0WRD2S1")
end
\ No newline at end of file diff --git a/durt/nodes/(-3642,18,-4002).lua b/durt/nodes/(-3642,18,-4002).lua deleted file mode 100644 index 7489acc..0000000 --- a/durt/nodes/(-3642,18,-4002).lua +++ /dev/null @@ -1 +0,0 @@ ---
\ No newline at end of file diff --git a/durt/nodes/(-3818,18,-4761).lua b/durt/nodes/(-3818,18,-4761).lua deleted file mode 100644 index 64f31ae..0000000 --- a/durt/nodes/(-3818,18,-4761).lua +++ /dev/null @@ -1,10 +0,0 @@ -if (event.type == "train") then - local rc = get_rc() - if rc == "sfh_service" then - set_autocouple()
atc_send("B0")
set_rc("sfh_shunt")
interrupt(5, "proceed") - else
atc_send("B0WD3OCRSM") - unset_autocouple() - set_rc("sfh_service") - set_line("SHBL") - atc_set_text_outside("Sulfur Hills Branch Line -> Desert Junction")
end
elseif (event.type == "int") then
set_route("sfh-T1-headshunt", "Enter Headshunt")
split_off_locomotive("B0OL") - setstate("SFH-T2-S", "cr")
atc_send("S2")
end
\ No newline at end of file diff --git a/durt/nodes/(-3820,18,-4728).lua b/durt/nodes/(-3820,18,-4728).lua deleted file mode 100644 index cc4264b..0000000 --- a/durt/nodes/(-3820,18,-4728).lua +++ /dev/null @@ -1,5 +0,0 @@ -if event.train and atc_arrow then - if get_rc() == "sfh_shunt" then - atc_send("S0WRD1S2") - end -end
\ No newline at end of file diff --git a/durt/nodes/(-3820,18,-4757).lua b/durt/nodes/(-3820,18,-4757).lua deleted file mode 100644 index 2dd69fd..0000000 --- a/durt/nodes/(-3820,18,-4757).lua +++ /dev/null @@ -1,14 +0,0 @@ -if event.train and atc_arrow then - if get_rc() == "sfh_service" then - set_rc("sfh_shunt") - atc_set_text_outside("Sulfur Hills -> Desert Junction") - atc_set_text_inside("Locomotive will return soon\nSulfur Hills -> Desert Junction") - split_off_locomotive("B0WD1OL") - set_autocouple() - set_route("SFH-T1S-sig","Headshunt") - elseif get_rc() =="sfh_shunt" then - atc_send("A0OLBBWRD3OCD1A1S4D10SM") - atc_set_text_inside("") - set_rc("sfh_service") - end -end
\ No newline at end of file diff --git a/durt/nodes/(-3821,18,-4730).lua b/durt/nodes/(-3821,18,-4730).lua deleted file mode 100644 index d1f3c8e..0000000 --- a/durt/nodes/(-3821,18,-4730).lua +++ /dev/null @@ -1,8 +0,0 @@ -do return end ---disabled while extension trackwork in progress. Service is stopped anyway - - - -if event.train and atc_arrow and get_rc() == "sfh_shunt" then - setstate("SFH-T1-N", "st")
atc_send("B0WRD1S3") -end
\ No newline at end of file diff --git a/durt/nodes/(-3823,18,-4774).lua b/durt/nodes/(-3823,18,-4774).lua deleted file mode 100644 index 8ece33e..0000000 --- a/durt/nodes/(-3823,18,-4774).lua +++ /dev/null @@ -1,7 +0,0 @@ -if event.type == "train" and atc_arrow and get_rc() == "sfh_shunt" then - atc_send("B0WRS4") ---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/(-4818,13,-6820).lua b/durt/nodes/(-4818,13,-6820).lua new file mode 100644 index 0000000..526cb6d --- /dev/null +++ b/durt/nodes/(-4818,13,-6820).lua @@ -0,0 +1,46 @@ +-- Automatic bouncer for headshunts, assuming longer headshunt than train length. Arrow points into headshunt +local rev_rc = "KKD_HS_U" +local rm_rc = true +local autocouple = "KKD_HS_U_CPL" +local rm_cpl_rc = true + +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + if not F.has_rc(rev_rc) then return end + atc_set_lzb_tsr(3) + atc_set_ars_disable(true) + return +end + +if event.train then + if not atc_arrow then --train has bounced + if F.has_rc(autocouple) then + atc_send("CplS0WD2S1") + if rm_cpl_rc then F.remove_rc({autocouple}) end + end + return + end + + if not F.has_rc(rev_rc) then --not our train. disregard + atc_set_ars_disable(false) + return + end + F.remove_rc("KKD_RUNAROUND") + if rm_rc then F.remove_rc({rev_rc}) end + schedule_in(";01",atc_id) + return +end + +if event.schedule then + if not atc_id then --bounce the train that just passed + atc_send_to_train(event.msg,"B0WRD1A1S3") + else + if atc_id == event.msg then --train hasn't fully passed yet, wait a bit longer + schedule_in(";01",atc_id) + else -- somehow another train crossed the controller before the first one returned. Unlikely but possible + atc_send_to_train(event.msg,"BBOL") + atc_send("BBOL") + end + end +end
\ No newline at end of file diff --git a/durt/nodes/(-4896,13,-6820).lua b/durt/nodes/(-4896,13,-6820).lua new file mode 100644 index 0000000..103c52f --- /dev/null +++ b/durt/nodes/(-4896,13,-6820).lua @@ -0,0 +1,28 @@ +-- KKD Runaround +local rejoin_rc = "KKD_REJOIN" +local runaround_cmd = { + "KKD_RUNAROUND", --HS_Down access, runaround + "KKD_HS_U", -- HS_Up access + "KKD_HS_U_CPL", -- recouple in Down Direction + rejoin_rc -- Down rejoin director +} +__approach_callback_mode = 1 +if event.approach and not event.has_entered then + if not F.has_rc("SFHB") then return end + atc_set_text_inside("Next Station: Kokardine\nService Terminates Here") + atc_set_lzb_tsr(1) + return +end +if event.train then + if not get_line() == "SFHB" then return end + if not F.has_rc(rejoin_rc) then --train has arrived. Split and run around + atc_set_text_inside("Kokardine\nService Terminates Here") + split_off_locomotive("A0S0OL") + F.add_rc(runaround_cmd) + return + end + F.remove_rc(runaround_cmd) + atc_send("OCS0WRD5SM") + atc_set_text_inside("") + return +end
\ No newline at end of file diff --git a/durt/nodes/(-716,3,1894).lua b/durt/nodes/(-716,3,1894).lua index 7345c4a..01123f0 100644 --- a/durt/nodes/(-716,3,1894).lua +++ b/durt/nodes/(-716,3,1894).lua @@ -1,4 +1,4 @@ if event then return end --temporarily disable the track ------------------------------------------------------------------------------------------- -factory_exit_sig = "icebreaker_factory_exit"
inside_maniest = "Cargo: Empty\nOrigin: Icebreaker Factory\nDestination: Auto Plantation"
outside_naming = "DURT Logs to Diamond Conversion Train"
mainline_rc = "autorun FREIGHT"
mainline_ln = "Maverick2797_diamonds"
if event.train then
digiline_send("train_response","Train "..atc_id.." ready||Entered factory:||Speed: "..atc_speed)
set_line(mainline_ln)
set_rc(mainline_rc)
atc_set_text_outside(outside_naming)
atc_set_text_inside(inside_maniest)
end
if event.digiline then
if event.channel=="train_control" then
if not atc_id then
digiline_send("train_response","No Train Detected")
return
end
if event.msg=="shuffle" then
if atc_speed > 0 then
digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed)
return
elseif not can_set_route(factory_exit_sig,"Reverse to Breaker-side Siding") then
digiline_send("train_response","Unable to set route to:||Breaker-side Siding")
return
else
set_route(factory_exit_sig,"Reverse to Breaker-side Siding")
atc_send("R S1 D5 SM D13 S0 W R S1")
digiline_send("train_response","Refilling Input Chests||Shuffling Train")
return
end
return
elseif event.msg=="exit" then
if atc_speed > 0 then
digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed)
return
elseif not can_set_route(factory_exit_sig,"Exit to Mainline South") then
digiline_send("train_response","Unable to set route to:||Mainline South")
return
else
set_route(factory_exit_sig,"Exit to Mainline South")
atc_send("R SM")
digiline_send("train_response","Train Departing")
return
end
return
elseif event.msg=="rehead" then
if atc_speed > 0 then
digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed)
return
elseif not can_set_route(factory_exit_sig,"Reverse for loco run-around") then
digiline_send("train_response","Unable to set route to:||Loco Run Around Sequence")
return
else
set_route(factory_exit_sig,"Reverse for loco run-around")
set_rc("split_around")
atc_send("R SM D15 S0 W R S1")
digiline_send("train_response","Loco Changind Ends")
return
end
return
end
return
end
return
end
\ No newline at end of file +factory_exit_sig = "icebreaker_factory_exit"
inside_maniest = "Cargo: Empty\nOrigin: Icebreaker Factory\nDestination: Auto Plantation"
outside_naming = "DURT Logs to Diamond Conversion Train"
mainline_rc = "autorun FREIGHT"
mainline_ln = "Maverick2797_diamonds"
if event.train then
digiline_send("train_response","Train "..atc_id.." ready||Entered factory:||Speed: "..atc_speed)
set_line(mainline_ln)
set_rc(mainline_rc)
atc_set_text_outside(outside_naming)
atc_set_text_inside(inside_maniest)
end
if event.digiline then
if event.channel=="train_control" then
if not atc_id then
digiline_send("train_response","No Train Detected")
return
end
if event.msg=="shuffle" then
if atc_speed > 0 then
digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed)
return
elseif not can_set_route(factory_exit_sig,"Reverse to Breaker-side Siding") then
digiline_send("train_response","Unable to set route to:||Breaker-side Siding")
return
else
set_route(factory_exit_sig,"Reverse to Breaker-side Siding")
atc_send("R S1 D5 SM D13 S0 W R S1")
digiline_send("train_response","Refilling Input Chests||Shuffling Train")
return
end
return
elseif event.msg=="exit" then
if atc_speed > 0 then
digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed)
return
elseif not can_set_route(factory_exit_sig,"Exit to Mainline South") then
digiline_send("train_response","Unable to set route to:||Mainline South")
return
else
set_route(factory_exit_sig,"Exit to Mainline South")
atc_send("R SM")
digiline_send("train_response","Train Departing")
return
end
return
elseif event.msg=="rehead" then
if atc_speed > 0 then
digiline_send("train_response","Please wait:||train still moving||Speed: "..atc_speed)
return
elseif not can_set_route(factory_exit_sig,"Reverse for loco run-around") then
digiline_send("train_response","Unable to set route to:||Loco Run Around Sequence")
return
else
set_route(factory_exit_sig,"Reverse for loco run-around")
set_rc("split_around")
atc_send("R SM D15 S0 W R S1")
digiline_send("train_response","Loco Changing Ends")
return
end
return
end
return
end
return
end
\ No newline at end of file diff --git a/ers/nodes/(1654,6,1237).lua b/ers/nodes/(1654,6,1237).lua index 06bcac2..5613fb9 100644 --- a/ers/nodes/(1654,6,1237).lua +++ b/ers/nodes/(1654,6,1237).lua @@ -1,6 +1,6 @@ -- lluaoperatingpanel_depot_03.lua local show_print = false -if event.type == "punch" then +if event.type == "punch" and event.name == "erstazi" then -- trainID = 999999999 -- F.slow_train_down(trainID) F.clear_main_depot_displays() diff --git a/ers/nodes/(1657,6,1237).lua b/ers/nodes/(1657,6,1237).lua index 747e816..fc55bce 100644 --- a/ers/nodes/(1657,6,1237).lua +++ b/ers/nodes/(1657,6,1237).lua @@ -1,6 +1,6 @@ -- luaoperatingpanel_depot_01.lua local show_print = false -if event.type == "punch" then +if event.type == "punch" and event.name == "erstazi" then -- F.train_info("RESETALL", show_print) return end
\ No newline at end of file diff --git a/ers/nodes/(1658,6,1237).lua b/ers/nodes/(1658,6,1237).lua index 9017b1b..680890c 100644 --- a/ers/nodes/(1658,6,1237).lua +++ b/ers/nodes/(1658,6,1237).lua @@ -1,6 +1,6 @@ -- luaoperatingpanel_depot_02.lua local show_print = false -if event.type == "punch" then +if event.type == "punch" and event.name == "erstazi" then -- F.delete_train_info("337564") -- F.delete_train_info("450511") diff --git a/ers/nodes/(1702,2,1269).lua b/ers/nodes/(1702,2,1269).lua index 851d36f..8aefbd4 100644 --- a/ers/nodes/(1702,2,1269).lua +++ b/ers/nodes/(1702,2,1269).lua @@ -1,6 +1,6 @@ -- luaatctrack_run_sequence_01.lua local show_print = false -if event.type == "punch" then +if event.type == "punch" and event.name == "erstazi" then F.trial_setup("split_train_1_4") -- F.trial_setup("loop_test1") -- F.trial_setup("loop_autocouple_1_4") diff --git a/ers/nodes/(1702,2,1270).lua b/ers/nodes/(1702,2,1270).lua index 823ad84..5cfc741 100644 --- a/ers/nodes/(1702,2,1270).lua +++ b/ers/nodes/(1702,2,1270).lua @@ -1,6 +1,6 @@ -- luaatctrack_run_sequence_01.lua local show_print = false -if event.type == "punch" then +if event.type == "punch" and event.name == "erstazi" then F.trial_setup("autocouple_1_4") return end
\ No newline at end of file diff --git a/ers/nodes/(1704,2,1269).lua b/ers/nodes/(1704,2,1269).lua index 05766c3..f1ac622 100644 --- a/ers/nodes/(1704,2,1269).lua +++ b/ers/nodes/(1704,2,1269).lua @@ -1,6 +1,6 @@ -- luaatctrack_run_sequence_01.lua -if event.type == "punch" then +if event.type == "punch" and event.name == "erstazi" then F.reset_trial_setup() return end
\ No newline at end of file diff --git a/far/init_code.lua b/far/init_code.lua index 429d6ac..49b0be6 100644 --- a/far/init_code.lua +++ b/far/init_code.lua @@ -29,6 +29,7 @@ F.ttp={ stn_display = "FAR Salt Factory", }, } +-- S.ttp["FAR_E"].force_tt_reset = true F.print = function (str) if F.debug then print("".. (str or "nil") ) end end F.isempty = function (s) return s == nil or s == "" end diff --git a/far/nodes/(1753,8,1570).lua b/far/nodes/(1753,8,1570).lua index e6e9bd4..7d945dc 100644 --- a/far/nodes/(1753,8,1570).lua +++ b/far/nodes/(1753,8,1570).lua @@ -7,7 +7,7 @@ F.save_train(POS(1755,8,1570), "west") F.ttp_begin({ stn = "Salt Factory", -- station name tt = "FAR_E", -- timetable ID - depint = "13;00", --departure slot interval + depint = "8;00", --departure slot interval depoff = "00;00", --departure slot offset doorside = "L", reverse = true, diff --git a/far/nodes/(1771,10,1563).lua b/far/nodes/(1771,10,1563).lua index 3150a83..a70b572 100644 --- a/far/nodes/(1771,10,1563).lua +++ b/far/nodes/(1771,10,1563).lua @@ -1,5 +1,5 @@ F.ttp_station_display({ - lines = {"FAR_W"}, + lines = {"FAR_W", "FAR_E"}, departure = {}, station = "Salt Factory", title = "Salt Factory", diff --git a/far/nodes/(1873,7,1568).lua b/far/nodes/(1873,7,1568).lua new file mode 100644 index 0000000..e36ad3b --- /dev/null +++ b/far/nodes/(1873,7,1568).lua @@ -0,0 +1,5 @@ +if event.type == "train" then + if atc_arrow and atc_id then + F.delete_train_info(atc_id) + end +end
\ No newline at end of file diff --git a/far/nodes/(20278,14,682).lua b/far/nodes/(20278,14,682).lua new file mode 100644 index 0000000..7d1f171 --- /dev/null +++ b/far/nodes/(20278,14,682).lua @@ -0,0 +1,4 @@ +-- far_luaatctrack_spot_check_01.lua + + +F.save_train(POS( 20278,14,682 ), "east") diff --git a/far/nodes/(20279,14,683).lua b/far/nodes/(20279,14,683).lua deleted file mode 100644 index e43d146..0000000 --- a/far/nodes/(20279,14,683).lua +++ /dev/null @@ -1,4 +0,0 @@ --- far_luaatctrack_spot_check_01.lua - - -F.save_train(POS( 20279,14,683 ), "east") diff --git a/far/nodes/(30825,16,1858).lua b/far/nodes/(30825,16,1858).lua index aad8e33..f22b67d 100644 --- a/far/nodes/(30825,16,1858).lua +++ b/far/nodes/(30825,16,1858).lua @@ -9,7 +9,7 @@ if event.type == "punch" then F.send_update_displays() digiline_send("notices", "LP: " .. event.name .. "") - + -- digiline_send("security", "FARCOM SECURITY\nBLAME: ") if S.stop_display then date = F.date_formatted() time = F.time_formatted() diff --git a/far/nodes/(30856,15,1814).lua b/far/nodes/(30856,15,1814).lua index f8811e3..919a0cc 100644 --- a/far/nodes/(30856,15,1814).lua +++ b/far/nodes/(30856,15,1814).lua @@ -7,7 +7,7 @@ F.save_train(POS(30856,15,1814), "east") F.ttp_begin({ stn = "Fareast End", -- station name tt = "FAR_W", -- timetable ID - depint = "13;00", --departure slot interval + depint = "8;00", --departure slot interval depoff = "00;00", --departure slot offset doorside = "R", reverse = false, diff --git a/far/nodes/(30863,15,1807).lua b/far/nodes/(30863,15,1807).lua index 955f13d..f42aa48 100644 --- a/far/nodes/(30863,15,1807).lua +++ b/far/nodes/(30863,15,1807).lua @@ -7,7 +7,7 @@ F.save_train(POS(30863,15,1807), "east") F.ttp_begin({ stn = "Fareast End", -- station name tt = "FAR_W", -- timetable ID - depint = "13;00", --departure slot interval + depint = "8;00", --departure slot interval depoff = "00;00", --departure slot offset doorside = "R", reverse = false, diff --git a/far/nodes/(30870,15,1800).lua b/far/nodes/(30870,15,1800).lua index 13f4924..273875d 100644 --- a/far/nodes/(30870,15,1800).lua +++ b/far/nodes/(30870,15,1800).lua @@ -7,7 +7,7 @@ F.save_train(POS(30870,15,1800), "east") F.ttp_begin({ stn = "Fareast End", -- station name tt = "FAR_W", -- timetable ID - depint = "13;00", --departure slot interval + depint = "8;00", --departure slot interval depoff = "00;00", --departure slot offset doorside = "R", reverse = false, diff --git a/far/nodes/(4602,10,2166).lua b/far/nodes/(4602,10,2166).lua index 159ae02..c8c6fe8 100644 --- a/far/nodes/(4602,10,2166).lua +++ b/far/nodes/(4602,10,2166).lua @@ -6,4 +6,5 @@ F.ttp_station_display({ interval = 30, display1 = "d1", -- display2 = "d2", +-- show_trainid = true, })
\ No newline at end of file diff --git a/far/nodes/(5323,32,2321).lua b/far/nodes/(5323,32,2321).lua new file mode 100644 index 0000000..dccf23d --- /dev/null +++ b/far/nodes/(5323,32,2321).lua @@ -0,0 +1,3 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5323,32,2321), "west") diff --git a/far/nodes/(5326,32,2311).lua b/far/nodes/(5326,32,2311).lua new file mode 100644 index 0000000..66c932f --- /dev/null +++ b/far/nodes/(5326,32,2311).lua @@ -0,0 +1,3 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5326,32,2311), "east") diff --git a/far/nodes/(5409,33,2336).lua b/far/nodes/(5409,33,2336).lua new file mode 100644 index 0000000..45fd236 --- /dev/null +++ b/far/nodes/(5409,33,2336).lua @@ -0,0 +1,3 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5409,33,2336), "west") diff --git a/far/nodes/(5409,33,2339).lua b/far/nodes/(5409,33,2339).lua new file mode 100644 index 0000000..6b455ca --- /dev/null +++ b/far/nodes/(5409,33,2339).lua @@ -0,0 +1,13 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5409,33,2339), "west") + +--[[ +F.ttp_stop({ + stn = "DAS LOOP", + doorside = "R", + only_lines = {['FAR'] = true}, + pos = POS(5409,33,2339), + direction = "west", +}) +]]
\ No newline at end of file diff --git a/far/nodes/(5434,33,2329).lua b/far/nodes/(5434,33,2329).lua new file mode 100644 index 0000000..fb0b414 --- /dev/null +++ b/far/nodes/(5434,33,2329).lua @@ -0,0 +1,13 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5434,33,2329), "east") + +--[[ +F.ttp_stop({ + stn = "DAS LOOP", + doorside = "R", + only_lines = {['FAR'] = true}, + pos = POS(5434,33,2329), + direction = "east", +}) +]]
\ No newline at end of file diff --git a/far/nodes/(5434,33,2332).lua b/far/nodes/(5434,33,2332).lua new file mode 100644 index 0000000..7cf6feb --- /dev/null +++ b/far/nodes/(5434,33,2332).lua @@ -0,0 +1,3 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5434,33,2332), "east") diff --git a/far/nodes/(5856,21,2314).lua b/far/nodes/(5856,21,2314).lua new file mode 100644 index 0000000..16b02a4 --- /dev/null +++ b/far/nodes/(5856,21,2314).lua @@ -0,0 +1,3 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5856,21,2314), "west") diff --git a/far/nodes/(5856,21,2315).lua b/far/nodes/(5856,21,2315).lua deleted file mode 100644 index 9e62790..0000000 --- a/far/nodes/(5856,21,2315).lua +++ /dev/null @@ -1,3 +0,0 @@ --- far_luaatctrack_spot_check_01.lua - -F.save_train(POS(5856,21,2315), "west") diff --git a/il_timetable/init_code.lua b/il_timetable/init_code.lua index c28ae86..5b6f9c5 100644 --- a/il_timetable/init_code.lua +++ b/il_timetable/init_code.lua @@ -229,7 +229,7 @@ F.ttp={ E16_E = { outside_text = "[E16] Cat-o-Land (By The Way)\nC&C Rail", inside_line_desc = "E16 to Cat-o-Land (By The Way)", - stn_display = "E16 Cat-o-Land ", + stn_display = "E16 By The Way ", }, E16_W = { outside_text = "[E16] Personhood\nC&C Rail", @@ -246,6 +246,16 @@ F.ttp={ inside_line_desc = "KVE to Spawn Main Station", stn_display = "KVE Spawn Main ", }, + DTLE1_N = { + outside_text = "[DTLE1] Banana Place", + inside_line_desc = "Dario Train Lines Express 1 (DTLE1) to Banana Place", + stn_display = "DTLE1 Banana Pl.", + }, + DTLE1_S = { + outside_text = "[DTLE1] Morija North", + inside_line_desc = "Dario Train Lines Express 1 (DTLE1) to Morija North", + stn_display = "DTLE1 Morija N. ", + }, } --[[ @@ -291,11 +301,19 @@ function F.ttp_begin(p) -- Train might have had another TT before, do the cleanup from ttp_end here. local trno = S.ttt[atc_id] if trno then + local tto = trno.timetable local ttio = S.ttp[trno.timetable] if ttio.recording_train == atc_id then ttio.travel_times[p.stn] = rwt.diff(trno.initial_dep, time_now) ttio.station_order[#ttio.station_order+1] = p.stn - print(atc_id,"for",p.tt,"at",p.stn,"-> travel time",rwt.to_string(ttio.travel_times[p.stn]),"-route end") + print(atc_id,"for",tto,"at",p.stn,"-> travel time",rwt.to_string(ttio.travel_times[p.stn]),"-route end") + elseif DYNAMIC_EN and ttio.travel_times[p.stn] then + -- if we are too early then change travel time + local new_trav = rwt.diff(trno.initial_dep, time_now) + if new_trav < ttio.travel_times[p.stn] - DYNAMIC_THR then + print(atc_id,tto,"arrived at terminus",p.stn,"early, TT",ttio.travel_times[p.stn],"->",new_trav) + ttio.travel_times[p.stn] = new_trav + end end end local next_dep_time = rwt.next_rpt(rwt.add(time_now, 10), p.depint, p.depoff) @@ -519,6 +537,7 @@ end display2 = "d2", display3 = "d3", show_trainid = false, + twohalf = false, -- special mode for Cat-O-Land, renders 2 1/2 width to .. and ..r }]] function F.ttp_station_display(p) --L425 @@ -536,7 +555,7 @@ local function add_train(deptime, line, train, tid) rwt.to_string(deptime,true) .." "..(p.show_trainid and tid.." " or "") ..F.ttp[line].stn_display - .." +"..train.last_delay} + ..(p.twohalf and "" or " +"..train.last_delay)} for i,ntrn in ipairs(next_trains) do if rwt.diff(ntrn.dep, deptime)<0 then table.insert(next_trains, i, tent) @@ -580,6 +599,15 @@ for i=1,3 do end end digiline_send(p.display1, text1) +if p.twohalf then + local text1r = " "..p.title .. " * "..rwt.to_string(rwt.now(), true).." * " + for i=1,3 do + if next_trains[i] then + text1r = text1r .. "\n ".. next_trains[i].text + end + end + digiline_send(p.display1.."r", text1r) +end if p.display2 then local text2 = "" for i=4,7 do diff --git a/il_timetable/nodes/(-1725,-1,-4420).lua b/il_timetable/nodes/(-1725,-1,-4420).lua deleted file mode 100644 index 2a9ff56..0000000 --- a/il_timetable/nodes/(-1725,-1,-4420).lua +++ /dev/null @@ -1,3 +0,0 @@ -if event.train and get_line() == "E1" then - atc_send("B1") -end
\ No newline at end of file diff --git a/il_timetable/nodes/(-1735,-1,-4398).lua b/il_timetable/nodes/(-1735,-1,-4398).lua deleted file mode 100644 index 2e1f620..0000000 --- a/il_timetable/nodes/(-1735,-1,-4398).lua +++ /dev/null @@ -1 +0,0 @@ --- You forgot to change the env from ers so I did it for you. you had it as ers. It was blank as well. - erstazi
\ No newline at end of file diff --git a/il_timetable/nodes/(-1921,13,-4541).lua b/il_timetable/nodes/(-1921,13,-4541).lua index 921af94..b752e61 100644 --- a/il_timetable/nodes/(-1921,13,-4541).lua +++ b/il_timetable/nodes/(-1921,13,-4541).lua @@ -1,2 +1,2 @@ -- reset timetable for this train -S.ttt[atc_id] = nil
\ No newline at end of file +S.ttt[atc_id] = nil diff --git a/il_timetable/nodes/(-1937,21,-4581).lua b/il_timetable/nodes/(-1937,21,-4581).lua index 007736b..fcdffda 100644 --- a/il_timetable/nodes/(-1937,21,-4581).lua +++ b/il_timetable/nodes/(-1937,21,-4581).lua @@ -8,5 +8,6 @@ F.ttp_station_display({ -- interval = 15, display1 = "d1", -- display2 = "d2", + --show_trainid = true, }) end
\ No newline at end of file diff --git a/il_timetable/nodes/(-435,23,377).lua b/il_timetable/nodes/(-435,23,377).lua index 79457dd..a3ed939 100644 --- a/il_timetable/nodes/(-435,23,377).lua +++ b/il_timetable/nodes/(-435,23,377).lua @@ -1,5 +1,5 @@ F.ttp_stop({ stn = "Anju Crossing Central", - doorside = "R", + doorside = "L", only_lines={E1=true}, })
\ No newline at end of file diff --git a/il_timetable/nodes/(-699,1,-426).lua b/il_timetable/nodes/(-699,1,-426).lua index 908ee47..03c7dd0 100644 --- a/il_timetable/nodes/(-699,1,-426).lua +++ b/il_timetable/nodes/(-699,1,-426).lua @@ -1,4 +1,4 @@ if get_line()=="KVE" then set_rc("KVE_E") - atc_set_text_outside("[KVE] Kangasvarkaa Express\n-> KANGASVARKAA\nvia Sameary, Morija") + atc_set_text_outside("[KVE] Kangasvarkaa Express\n-> KANGASVARKAA\nvia Kameary, Morija") 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 9e9453c..77fbd16 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 - BigFishCity\n via Trisiston") set_rc("E3_Sra") else - atc_set_text_outside("E3 - Shanielle Park\n via Trisiston, Shn. Inlet") + atc_set_text_outside("E3 - New Eden\n via Trisiston, Shanielle Park") set_rc("E3_Edf") end flip = not flip
\ No newline at end of file diff --git a/il_timetable/nodes/(-5925,-1,-3899).lua b/il_timetable/nodes/(-9673,7,-3552).lua index 5bb0895..5bb0895 100644 --- a/il_timetable/nodes/(-5925,-1,-3899).lua +++ b/il_timetable/nodes/(-9673,7,-3552).lua diff --git a/il_timetable/nodes/(1199,18,6127).lua b/il_timetable/nodes/(1187,21,6115).lua index 47bed36..47bed36 100644 --- a/il_timetable/nodes/(1199,18,6127).lua +++ b/il_timetable/nodes/(1187,21,6115).lua diff --git a/il_timetable/nodes/(1191,16,6123).lua b/il_timetable/nodes/(1191,16,6123).lua new file mode 100644 index 0000000..0dff8a1 --- /dev/null +++ b/il_timetable/nodes/(1191,16,6123).lua @@ -0,0 +1,9 @@ +F.ttp_begin({ + stn = "Namespace Mountains", -- station name + tt = "DTLE1_S", -- timetable ID + depint = "00;30", --departure slot interval + depoff = "00;00", --departure slot offset + doorside = "R", + only_lines = { DTLE1 = true }, + force_tt_reset = false, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(1194,16,6140).lua b/il_timetable/nodes/(1194,16,6140).lua new file mode 100644 index 0000000..6a555f2 --- /dev/null +++ b/il_timetable/nodes/(1194,16,6140).lua @@ -0,0 +1,6 @@ +F.ttp_stop({ + stn = "Namespace Mountains", -- station name + doorside = "R", + only_lines = { DTLE1 = true }, + end_of_tt = { DTLE1 = true, DTLE1_N = true }, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(1211,9,1007).lua b/il_timetable/nodes/(1211,9,1007).lua new file mode 100644 index 0000000..fb5ca78 --- /dev/null +++ b/il_timetable/nodes/(1211,9,1007).lua @@ -0,0 +1,8 @@ +F.ttp_station_display({ + lines = {"S12_S", "S12_N"}, + departure = {}, + station = "Silver Coast Central", + title = "Silver Cst (LFR)", + display1 = "d", + show_trainid = false, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(1215,8,1013).lua b/il_timetable/nodes/(1215,8,1013).lua new file mode 100644 index 0000000..a8a6937 --- /dev/null +++ b/il_timetable/nodes/(1215,8,1013).lua @@ -0,0 +1,10 @@ +F.ttp_begin({ + stn = "Silver Coast Central", + tt = "S12_S", -- timetable ID + depint = "05;00", --departure slot interval + depoff = "02;40", --departure slot offset + doorside = "R", + reverse = true, + only_lines = {S12=true}, + force_tt_reset = false, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(142,8,164).lua b/il_timetable/nodes/(142,8,164).lua index 09f6f9e..f13c633 100644 --- a/il_timetable/nodes/(142,8,164).lua +++ b/il_timetable/nodes/(142,8,164).lua @@ -2,7 +2,7 @@ F.ttp_begin({ stn = "Origin Berton Street", -- station name tt = "CFE_N", -- timetable ID depint = "05;00", --departure slot interval - depoff = "03;15", --departure slot offset + depoff = "02;15", --departure slot offset doorside = "L", reverse = true, only_lines = {['CFE'] = true}, diff --git a/il_timetable/nodes/(1604,-1,7982).lua b/il_timetable/nodes/(1604,-1,7982).lua deleted file mode 100644 index 540c7b7..0000000 --- a/il_timetable/nodes/(1604,-1,7982).lua +++ /dev/null @@ -1,10 +0,0 @@ -F.ttp_begin({ - stn = "New Roses Gardens", -- station name - tt = "NRG_E", -- timetable ID - depint = "10;00", --departure slot interval - depoff = "03;30", --departure slot offset - doorside = "L", - reverse = true, - only_lines = nil, - force_tt_reset = false, -- force reset of travel times for this timetable -})
\ No newline at end of file diff --git a/il_timetable/nodes/(1618,-1,7982).lua b/il_timetable/nodes/(1618,-1,7982).lua index 9a51353..9e61289 100644 --- a/il_timetable/nodes/(1618,-1,7982).lua +++ b/il_timetable/nodes/(1618,-1,7982).lua @@ -1,8 +1,8 @@ F.ttp_begin({ stn = "New Roses Gardens", -- station name tt = "NRG_E", -- timetable ID - depint = "10;00", --departure slot interval - depoff = "08;30", --departure slot offset + depint = "05;00", --departure slot interval + depoff = "00;00", --departure slot offset doorside = "R", reverse = true, only_lines = nil, diff --git a/il_timetable/nodes/(1722,30,2933).lua b/il_timetable/nodes/(1722,30,2934).lua index e5f5896..d73c3c8 100644 --- a/il_timetable/nodes/(1722,30,2933).lua +++ b/il_timetable/nodes/(1722,30,2934).lua @@ -6,4 +6,5 @@ F.ttp_station_display({ interval = 15, display1 = "d1", --display2 = "d2", + twohalf = true })
\ No newline at end of file diff --git a/il_timetable/nodes/(1722,30,2937).lua b/il_timetable/nodes/(1722,30,2936).lua index 560dfbe..4ebaa6e 100644 --- a/il_timetable/nodes/(1722,30,2937).lua +++ b/il_timetable/nodes/(1722,30,2936).lua @@ -6,4 +6,5 @@ F.ttp_station_display({ interval = 15, display1 = "d1", --display2 = "d2", + twohalf = true })
\ No newline at end of file diff --git a/il_timetable/nodes/(1734,26,2929).lua b/il_timetable/nodes/(1734,26,2929).lua index 1d8f85b..0fe54cc 100644 --- a/il_timetable/nodes/(1734,26,2929).lua +++ b/il_timetable/nodes/(1734,26,2929).lua @@ -8,4 +8,7 @@ F.ttp_begin({ reverse = false, only_lines = { E16 = true }, force_tt_reset = false, -})
\ No newline at end of file +}) +--[[if event.train then +set_rc("FREIGHT") +end]]--
\ No newline at end of file diff --git a/il_timetable/nodes/(1953,19,8220).lua b/il_timetable/nodes/(1953,19,8220).lua index 66e9723..531fc82 100644 --- a/il_timetable/nodes/(1953,19,8220).lua +++ b/il_timetable/nodes/(1953,19,8220).lua @@ -1,5 +1,5 @@ F.ttp_stop({ stn = "Krasnograd", doorside = "R", - departure = { NRG_E = "3;00" } + --departure = { NRG_E = "3;00" } })
\ No newline at end of file diff --git a/il_timetable/nodes/(1955,25,8523).lua b/il_timetable/nodes/(1955,25,8523).lua new file mode 100644 index 0000000..0c39d29 --- /dev/null +++ b/il_timetable/nodes/(1955,25,8523).lua @@ -0,0 +1,10 @@ +F.ttp_station_display({ + lines = {"CFE_S", "CFE_N", "NRG_W", "NRG_E"}, + departure = {}, + station = "Azena Transirejo", + title = "Azena Transirejo", + interval = 30, + display1 = "display1", + --display2 = "display2", + notimer = true, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(1972,23,8510).lua b/il_timetable/nodes/(1972,23,8510).lua new file mode 100644 index 0000000..6e23563 --- /dev/null +++ b/il_timetable/nodes/(1972,23,8510).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Azena Transirejo", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(1973,42,8383).lua b/il_timetable/nodes/(1973,42,8383).lua index 1637b6a..13bed58 100644 --- a/il_timetable/nodes/(1973,42,8383).lua +++ b/il_timetable/nodes/(1973,42,8383).lua @@ -1,10 +1,2 @@ -F.ttp_station_display({ - lines = {"CFE_S", "CFE_N", "NRG_W", "NRG_E"}, - departure = {}, - station = "Azena Transirejo", - title = "Azena Transirejo", - interval = 30, - display1 = "display1", - display2 = "display2", - notimer = true, -})
\ No newline at end of file +digiline_send("display1", "No service") +digiline_send("display2", "New Azena Transirejo\nstation -->") diff --git a/il_timetable/nodes/(1975,23,8527).lua b/il_timetable/nodes/(1975,23,8527).lua new file mode 100644 index 0000000..6e23563 --- /dev/null +++ b/il_timetable/nodes/(1975,23,8527).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Azena Transirejo", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(1983,23,8515).lua b/il_timetable/nodes/(1983,23,8515).lua new file mode 100644 index 0000000..df2266f --- /dev/null +++ b/il_timetable/nodes/(1983,23,8515).lua @@ -0,0 +1,10 @@ +F.ttp_begin({ + stn = "Azena Transirejo", -- station name + tt = "NRG_W", -- timetable ID + depint = "05;00", --departure slot interval + depoff = "00;00", --departure slot offset + doorside = "L", + reverse = true, + only_lines = {["CFE-NRG"] = true}, + force_tt_reset = false, -- force reset of travel times for this timetable +})
\ No newline at end of file diff --git a/il_timetable/nodes/(2514,7,5027).lua b/il_timetable/nodes/(2514,7,5027).lua index 1ab4b5c..965b765 100644 --- a/il_timetable/nodes/(2514,7,5027).lua +++ b/il_timetable/nodes/(2514,7,5027).lua @@ -1,10 +1,4 @@ -F.ttp_begin({ - stn = "Overfish Beach", -- station name - tt = "E16_W", -- timetable ID - depint = "00;30", --departure slot interval - depoff = "00;00", --departure slot offset - doorside = "L", - reverse = false, - only_lines = { E16 = true }, - force_tt_reset = false, -}) +F.ttp_stop({ + stn = "Overfish Beach", + doorside = "L", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(2536,7,5021).lua b/il_timetable/nodes/(2536,7,5021).lua new file mode 100644 index 0000000..965b765 --- /dev/null +++ b/il_timetable/nodes/(2536,7,5021).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Overfish Beach", + doorside = "L", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(2635,13,4369).lua b/il_timetable/nodes/(2635,13,4369).lua index cf13114..56e00a2 100644 --- a/il_timetable/nodes/(2635,13,4369).lua +++ b/il_timetable/nodes/(2635,13,4369).lua @@ -1,5 +1,4 @@ F.ttp_stop({ stn = "Grub Valley (GVMER)", doorside = "R", - end_of_tt = {E16_E = true}, })
\ No newline at end of file diff --git a/il_timetable/nodes/(3166,7,5016).lua b/il_timetable/nodes/(3166,7,5016).lua new file mode 100644 index 0000000..4d87cf8 --- /dev/null +++ b/il_timetable/nodes/(3166,7,5016).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Qrungob", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(3183,7,5013).lua b/il_timetable/nodes/(3183,7,5013).lua new file mode 100644 index 0000000..4d87cf8 --- /dev/null +++ b/il_timetable/nodes/(3183,7,5013).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Qrungob", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(3665,30,5521).lua b/il_timetable/nodes/(3665,30,5521).lua new file mode 100644 index 0000000..896154a --- /dev/null +++ b/il_timetable/nodes/(3665,30,5521).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Moranbong", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(3668,30,5557).lua b/il_timetable/nodes/(3668,30,5557).lua new file mode 100644 index 0000000..896154a --- /dev/null +++ b/il_timetable/nodes/(3668,30,5557).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Moranbong", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4100,4,5242).lua b/il_timetable/nodes/(4100,4,5242).lua index 2c1e7f7..67edfcf 100644 --- a/il_timetable/nodes/(4100,4,5242).lua +++ b/il_timetable/nodes/(4100,4,5242).lua @@ -1,4 +1,4 @@ if get_line()=="KVE" then set_rc("KVE_W") - atc_set_text_outside("[KVE] Kangasvarkaa Express\n-> SPAWN\nvia Morija, Sameary, Origin") + atc_set_text_outside("[KVE] Kangasvarkaa Express\n-> SPAWN\nvia Morija, Kameary, Origin") end
\ No newline at end of file diff --git a/il_timetable/nodes/(4289,6,5647).lua b/il_timetable/nodes/(4289,6,5647).lua new file mode 100644 index 0000000..8e9f39b --- /dev/null +++ b/il_timetable/nodes/(4289,6,5647).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Kangasvarkaa", + doorside = "L", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4315,6,5637).lua b/il_timetable/nodes/(4315,6,5637).lua new file mode 100644 index 0000000..8e9f39b --- /dev/null +++ b/il_timetable/nodes/(4315,6,5637).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Kangasvarkaa", + doorside = "L", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4556,14,6817).lua b/il_timetable/nodes/(4556,14,6817).lua new file mode 100644 index 0000000..251f02e --- /dev/null +++ b/il_timetable/nodes/(4556,14,6817).lua @@ -0,0 +1,10 @@ +F.ttp_station_display({ + lines = {"E16_W", "E16_E"}, + departure = {}, + station = "By The Way", + title = "PLATFORM 2", + interval = 15, + display1 = "d1", +-- display2 = "d2", +-- twohalf = true, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4565,11,6814).lua b/il_timetable/nodes/(4565,11,6814).lua new file mode 100644 index 0000000..77a3f2b --- /dev/null +++ b/il_timetable/nodes/(4565,11,6814).lua @@ -0,0 +1,11 @@ +-- mary4: leave this here +F.ttp_begin({ + stn = "By The Way", -- station name + tt = "E16_W", -- timetable ID + depint = "05;00", --departure slot interval + depoff = "04;00", --departure slot offset + doorside = "L", + reverse = false, + only_lines = { E16 = true }, + force_tt_reset = false, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4587,7,2174).lua b/il_timetable/nodes/(4587,7,2174).lua index 5e9d62c..5ed6e8e 100644 --- a/il_timetable/nodes/(4587,7,2174).lua +++ b/il_timetable/nodes/(4587,7,2174).lua @@ -7,4 +7,14 @@ F.ttp_begin({ reverse = true, only_lines = { E85 = true }, force_tt_reset = false, +}) +F.ttp_begin({ + stn = "Morija North", -- station name + tt = "DTLE1_N", -- timetable ID + depint = "05;00", --departure slot interval + depoff = "07;30", --departure slot offset + doorside = "L", + reverse = true, + only_lines = { DTLE1 = true }, + force_tt_reset = false, })
\ No newline at end of file diff --git a/il_timetable/nodes/(4602,9,2181).lua b/il_timetable/nodes/(4602,9,2181).lua new file mode 100644 index 0000000..c4bed49 --- /dev/null +++ b/il_timetable/nodes/(4602,9,2181).lua @@ -0,0 +1,7 @@ +F.ttp_station_display({ + lines = {"E85_N", "E85_S", "DTLE1_N", "DTLE1_S"}, + departure = {}, + station = "Morija North", + title = "Morija North", + display1 = "d1", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4622,12,6795).lua b/il_timetable/nodes/(4654,11,6801).lua index cf6751b..cf6751b 100644 --- a/il_timetable/nodes/(4622,12,6795).lua +++ b/il_timetable/nodes/(4654,11,6801).lua diff --git a/il_timetable/nodes/(4739,12,5767).lua b/il_timetable/nodes/(4739,12,5767).lua new file mode 100644 index 0000000..ecb60c9 --- /dev/null +++ b/il_timetable/nodes/(4739,12,5767).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Malakaland Junction", + doorside = "L", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4769,12,5760).lua b/il_timetable/nodes/(4769,12,5760).lua new file mode 100644 index 0000000..ecb60c9 --- /dev/null +++ b/il_timetable/nodes/(4769,12,5760).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Malakaland Junction", + doorside = "L", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4899,20,6166).lua b/il_timetable/nodes/(4899,20,6166).lua new file mode 100644 index 0000000..32f1685 --- /dev/null +++ b/il_timetable/nodes/(4899,20,6166).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Sheep Hills", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(4902,20,6189).lua b/il_timetable/nodes/(4902,20,6189).lua new file mode 100644 index 0000000..32f1685 --- /dev/null +++ b/il_timetable/nodes/(4902,20,6189).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Sheep Hills", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5088,27,6520).lua b/il_timetable/nodes/(5088,27,6520).lua new file mode 100644 index 0000000..1394d01 --- /dev/null +++ b/il_timetable/nodes/(5088,27,6520).lua @@ -0,0 +1,8 @@ +F.ttp_station_display({ + lines = {"E16_W"}, + departure = {}, + station = "Sakura Gaps", + title = "PLATFORM 2", + display1 = "d1", + twohalf = true, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5088,27,6538).lua b/il_timetable/nodes/(5088,27,6538).lua new file mode 100644 index 0000000..1394d01 --- /dev/null +++ b/il_timetable/nodes/(5088,27,6538).lua @@ -0,0 +1,8 @@ +F.ttp_station_display({ + lines = {"E16_W"}, + departure = {}, + station = "Sakura Gaps", + title = "PLATFORM 2", + display1 = "d1", + twohalf = true, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5092,23,6515).lua b/il_timetable/nodes/(5092,23,6515).lua new file mode 100644 index 0000000..5d2778c --- /dev/null +++ b/il_timetable/nodes/(5092,23,6515).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Sakura Gaps", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5096,23,6543).lua b/il_timetable/nodes/(5096,23,6543).lua new file mode 100644 index 0000000..5d2778c --- /dev/null +++ b/il_timetable/nodes/(5096,23,6543).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Sakura Gaps", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5100,27,6520).lua b/il_timetable/nodes/(5100,27,6520).lua new file mode 100644 index 0000000..586c99a --- /dev/null +++ b/il_timetable/nodes/(5100,27,6520).lua @@ -0,0 +1,9 @@ +F.ttp_station_display({ + lines = {"E16_E"}, + departure = {}, + station = "Sakura Gaps", + title = "PLATFORM 1", + interval = 15, + display1 = "d1", +-- display2 = "d2", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5100,27,6538).lua b/il_timetable/nodes/(5100,27,6538).lua new file mode 100644 index 0000000..586c99a --- /dev/null +++ b/il_timetable/nodes/(5100,27,6538).lua @@ -0,0 +1,9 @@ +F.ttp_station_display({ + lines = {"E16_E"}, + departure = {}, + station = "Sakura Gaps", + title = "PLATFORM 1", + interval = 15, + display1 = "d1", +-- display2 = "d2", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5390,13,6916).lua b/il_timetable/nodes/(5390,13,6916).lua new file mode 100644 index 0000000..bc988f9 --- /dev/null +++ b/il_timetable/nodes/(5390,13,6916).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "C&C Farm", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5393,16,6910).lua b/il_timetable/nodes/(5393,16,6910).lua new file mode 100644 index 0000000..a6e9581 --- /dev/null +++ b/il_timetable/nodes/(5393,16,6910).lua @@ -0,0 +1,9 @@ +F.ttp_station_display({ + lines = {"E16_W"}, + departure = {}, + station = "C&C Farm", + title = "PLATFORM 3", + display1 = "d1", +-- display2 = "d2", + twohalf = true, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5393,16,6919).lua b/il_timetable/nodes/(5393,16,6919).lua new file mode 100644 index 0000000..a26ced4 --- /dev/null +++ b/il_timetable/nodes/(5393,16,6919).lua @@ -0,0 +1,9 @@ +F.ttp_station_display({ + lines = {"E16_E"}, + departure = {}, + station = "C&C Farm", + title = "PLATFORM 4", + interval = 15, + display1 = "d1", +-- display2 = "d2", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5400,16,6910).lua b/il_timetable/nodes/(5400,16,6910).lua new file mode 100644 index 0000000..a6e9581 --- /dev/null +++ b/il_timetable/nodes/(5400,16,6910).lua @@ -0,0 +1,9 @@ +F.ttp_station_display({ + lines = {"E16_W"}, + departure = {}, + station = "C&C Farm", + title = "PLATFORM 3", + display1 = "d1", +-- display2 = "d2", + twohalf = true, +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5400,16,6919).lua b/il_timetable/nodes/(5400,16,6919).lua new file mode 100644 index 0000000..a26ced4 --- /dev/null +++ b/il_timetable/nodes/(5400,16,6919).lua @@ -0,0 +1,9 @@ +F.ttp_station_display({ + lines = {"E16_E"}, + departure = {}, + station = "C&C Farm", + title = "PLATFORM 4", + interval = 15, + display1 = "d1", +-- display2 = "d2", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(5405,13,6913).lua b/il_timetable/nodes/(5405,13,6913).lua new file mode 100644 index 0000000..bc988f9 --- /dev/null +++ b/il_timetable/nodes/(5405,13,6913).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "C&C Farm", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(670,14,1011).lua b/il_timetable/nodes/(670,14,1011).lua index 0ed504e..58e1c91 100644 --- a/il_timetable/nodes/(670,14,1011).lua +++ b/il_timetable/nodes/(670,14,1011).lua @@ -2,4 +2,7 @@ F.ttp_stop({ stn = "Gardon Street", doorside = "R", only_lines={S12=true}, -})
\ No newline at end of file +}) +if event.train then + atc_set_ars_disable(false) +end
\ No newline at end of file diff --git a/il_timetable/nodes/(773,8,132).lua b/il_timetable/nodes/(773,8,132).lua index 4670b38..9356b57 100644 --- a/il_timetable/nodes/(773,8,132).lua +++ b/il_timetable/nodes/(773,8,132).lua @@ -1,10 +1,10 @@ F.ttp_begin({ stn = "Leekston East", -- station name tt = "NX_N", -- timetable ID --- depint = "05;00", --departure slot interval --- depoff = "02;00", --departure slot offset - depint = "02;30", --departure slot interval - depoff = "01;15", --departure slot offset + depint = "05;00", --departure slot interval + depoff = "01;00", --departure slot offset +-- depint = "02;30", --departure slot interval +-- depoff = "01;15", --departure slot offset doorside = "R", only_lines = {XN=true}, force_tt_reset = false, diff --git a/il_timetable/nodes/(951,8,1293).lua b/il_timetable/nodes/(951,8,1293).lua new file mode 100644 index 0000000..e746b85 --- /dev/null +++ b/il_timetable/nodes/(951,8,1293).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Broston", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(956,5,1304).lua b/il_timetable/nodes/(956,5,1304).lua new file mode 100644 index 0000000..8388cc5 --- /dev/null +++ b/il_timetable/nodes/(956,5,1304).lua @@ -0,0 +1,7 @@ +F.ttp_station_display({ + lines = {"E1_N", "E1_S", "NX_N", "NX_S", "CFE_N", "CFE_S"}, + departure = {}, + station = "Broston", + title = "Broston / Brostyn", + display1 = "d1", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(960,8,1309).lua b/il_timetable/nodes/(960,8,1309).lua new file mode 100644 index 0000000..e746b85 --- /dev/null +++ b/il_timetable/nodes/(960,8,1309).lua @@ -0,0 +1,4 @@ +F.ttp_stop({ + stn = "Broston", + doorside = "R", +})
\ No newline at end of file diff --git a/il_timetable/nodes/(981,21,1053).lua b/il_timetable/nodes/(981,21,1053).lua index be19fda..c00a6ff 100644 --- a/il_timetable/nodes/(981,21,1053).lua +++ b/il_timetable/nodes/(981,21,1053).lua @@ -1,14 +1,14 @@ ---N/S -local line = "E85" +--W/E +local line = "E16" -lines = F.ttp_info_times(line.."_N", "00;00") -linestr = F.ttp_info_trains(line.."_N", "00;00") +lines = F.ttp_info_times(line.."_W", "00;00") +linestr = F.ttp_info_trains(line.."_W", "00;00") local li = lines for i=1,#linestr do li[#li+1] = linestr[i] end -print(line.."_N\n"..table.concat(li, "\n")) +print(line.."_W\n"..table.concat(li, "\n")) -lines = F.ttp_info_times(line.."_S", "00;00") -linestr = F.ttp_info_trains(line.."_S", "00;00") +lines = F.ttp_info_times(line.."_E", "00;00") +linestr = F.ttp_info_trains(line.."_E", "00;00") local li = lines for i=1,#linestr do li[#li+1] = linestr[i] end -print(line.."_S\n"..table.concat(li, "\n"))
\ No newline at end of file +print(line.."_E\n"..table.concat(li, "\n"))
\ No newline at end of file diff --git a/il_timetable/nodes/(981,22,1053).lua b/il_timetable/nodes/(981,22,1053).lua index de30463..a48edb3 100644 --- a/il_timetable/nodes/(981,22,1053).lua +++ b/il_timetable/nodes/(981,22,1053).lua @@ -1,8 +1,5 @@ ---S.ttt["901424"] = nil ---S.ttp["E85_N"] = nil -nope() - -local tr="NRG" +-- E/W +local tr="E16" S.ttp[tr.."_E"].force_tt_reset = true S.ttp[tr.."_W"].force_tt_reset = true print(tr.." resetting timetable") diff --git a/il_timetable/nodes/(982,21,1053).lua b/il_timetable/nodes/(982,21,1053).lua index c00a6ff..6a15f27 100644 --- a/il_timetable/nodes/(982,21,1053).lua +++ b/il_timetable/nodes/(982,21,1053).lua @@ -1,14 +1,14 @@ ---W/E -local line = "E16" +--N/S +local line = "CFE" -lines = F.ttp_info_times(line.."_W", "00;00") -linestr = F.ttp_info_trains(line.."_W", "00;00") +lines = F.ttp_info_times(line.."_N", "00;00") +linestr = F.ttp_info_trains(line.."_N", "00;00") local li = lines for i=1,#linestr do li[#li+1] = linestr[i] end -print(line.."_W\n"..table.concat(li, "\n")) +print(line.."_N\n"..table.concat(li, "\n")) -lines = F.ttp_info_times(line.."_E", "00;00") -linestr = F.ttp_info_trains(line.."_E", "00;00") +lines = F.ttp_info_times(line.."_S", "00;00") +linestr = F.ttp_info_trains(line.."_S", "00;00") local li = lines for i=1,#linestr do li[#li+1] = linestr[i] end -print(line.."_E\n"..table.concat(li, "\n"))
\ No newline at end of file +print(line.."_S\n"..table.concat(li, "\n"))
\ No newline at end of file diff --git a/il_timetable/nodes/(982,22,1053).lua b/il_timetable/nodes/(982,22,1053).lua new file mode 100644 index 0000000..73b9d08 --- /dev/null +++ b/il_timetable/nodes/(982,22,1053).lua @@ -0,0 +1,5 @@ +-- N/S +local tr="CFE" +S.ttp[tr.."_N"].force_tt_reset = true +S.ttp[tr.."_S"].force_tt_reset = true +print(tr.." resetting timetable")
\ No newline at end of file diff --git a/il_timetable/nodes/(983,21,1053).lua b/il_timetable/nodes/(983,21,1053).lua new file mode 100644 index 0000000..84bed9c --- /dev/null +++ b/il_timetable/nodes/(983,21,1053).lua @@ -0,0 +1,3 @@ +for key,_ in pairs(S.ttp) do + print(key) +end
\ No newline at end of file diff --git a/il_timetable/nodes/(983,22,1053).lua b/il_timetable/nodes/(983,22,1053).lua index 23b5dea..55ea804 100644 --- a/il_timetable/nodes/(983,22,1053).lua +++ b/il_timetable/nodes/(983,22,1053).lua @@ -1 +1,2 @@ -S.ttt["187794"] = nil
\ No newline at end of file +S.ttt["986283"] = nil +S.ttt["979329"] = nil
\ No newline at end of file diff --git a/m4/init_code.lua b/m4/init_code.lua index d32be9f..65e58bb 100644 --- a/m4/init_code.lua +++ b/m4/init_code.lua @@ -53,33 +53,36 @@ function F.cpllooparound(ln) end --new ones +--these work with train going forward with engine in front! :D function F.split_looparound(ln) if not (event.train) then return end if not (F.get_line_safe() == ln) then return end + if not (F.get_train_length_safe() >= 2) then return end -- no wagons? do nothing! :D - split_at_index(F.get_train_length_safe()-1,"A0S0OC") --Stopping the wagons is handled here by SO + --split_at_index(F.get_train_length_safe()-1,"A0S0OC") --Stopping the wagons is handled here by SO + split_at_index(2,"A0S0OC") --Stopping the wagons is handled here by SO set_rc("ENGINE") atc_send("A1") - end function F.split_looparound_left(ln) if not (event.train) then return end if not (F.get_line_safe() == ln) then return end + if not (F.get_train_length_safe() >= 2) then return end -- no wagons? do nothing! :D - split_at_index(F.get_train_length_safe()-1,"A0S0OL") --Stopping the wagons is handled here by SO + split_at_index(2,"A0S0OL") --Stopping the wagons is handled here by SO set_rc("ENGINE") atc_send("A1") - end + function F.split_looparound_right(ln) if not (event.train) then return end if not (F.get_line_safe() == ln) then return end + if not (F.get_train_length_safe() >= 2) then return end -- no wagons? do nothing! :D - split_at_index(F.get_train_length_safe()-1,"A0S0OR") --Stopping the wagons is handled here by SO + split_at_index(2,"A0S0OR") --Stopping the wagons is handled here by SO set_rc("ENGINE") atc_send("A1") - end function F.cpl_looparound(ln) @@ -91,10 +94,16 @@ function F.cpl_looparound(ln) set_rc("") return end - end --end of new cpl functions +--[[ testing functions for train length print +]]-- +function F.print_length() + F.print(F.get_train_length_safe()) +end + + --[[ Utility Functions ]]-- F.indicator = function(indicator,set) diff --git a/m4/nodes/(-1524,-11,-4611).lua b/m4/nodes/(-1524,-11,-4611).lua new file mode 100644 index 0000000..6272a7b --- /dev/null +++ b/m4/nodes/(-1524,-11,-4611).lua @@ -0,0 +1,3 @@ +if get_line()=="52" then + atc_set_text_outside("Line 52 - Olo Beach") +end
\ No newline at end of file diff --git a/m4/nodes/(-1746,-7,-4392).lua b/m4/nodes/(-1746,-7,-4392).lua new file mode 100644 index 0000000..6a121ec --- /dev/null +++ b/m4/nodes/(-1746,-7,-4392).lua @@ -0,0 +1,5 @@ +if event.train then + if get_line()=="01" then + atc_set_text_outside("ALL01 - Luanti Institute\nvia Daston, Zengus, Rawhide, Vovanium ") + end +end
\ No newline at end of file diff --git a/m4/nodes/(-1921,13,-4576).lua b/m4/nodes/(-1921,13,-4576).lua new file mode 100644 index 0000000..eb9b943 --- /dev/null +++ b/m4/nodes/(-1921,13,-4576).lua @@ -0,0 +1,5 @@ +if event.train then + if get_line()=="E36" then + atc_set_text_outside("[E36] Souford\nSouthbound Express (SBX)") + end +end
\ No newline at end of file diff --git a/m4/nodes/(-1967,-11,-4415).lua b/m4/nodes/(-1967,-11,-4415).lua new file mode 100644 index 0000000..afb0335 --- /dev/null +++ b/m4/nodes/(-1967,-11,-4415).lua @@ -0,0 +1,3 @@ +if get_line()=="52" then + atc_set_text_outside("Line 52 - Merliansas Ruins") +end
\ No newline at end of file diff --git a/m4/nodes/(-570,8,-3809).lua b/m4/nodes/(-570,8,-3809).lua new file mode 100644 index 0000000..ebe4a8e --- /dev/null +++ b/m4/nodes/(-570,8,-3809).lua @@ -0,0 +1,5 @@ +if event.train then + if get_line()=="01" then + atc_set_text_outside("ALL01 - Town of Abyss\n via Vovanium, Rawhide, Zengus, Daston") + end +end
\ No newline at end of file diff --git a/m4/nodes/(1345,3,-5637).lua b/m4/nodes/(1345,3,-5637).lua new file mode 100644 index 0000000..b34a162 --- /dev/null +++ b/m4/nodes/(1345,3,-5637).lua @@ -0,0 +1,5 @@ +if event.train then + if get_line()=="E36" then + atc_set_text_outside("[E36] Melinka\nSouthbound Express (SBX)") + end +end
\ No newline at end of file diff --git a/m4/nodes/(1734,26,2901).lua b/m4/nodes/(1734,26,2901).lua index 66ba746..f10234c 100644 --- a/m4/nodes/(1734,26,2901).lua +++ b/m4/nodes/(1734,26,2901).lua @@ -1 +1,6 @@ -F.split_looparound_left("E16")
\ No newline at end of file +if (event.train) then +-- F.print_length() + atc_set_text_outside("[E16] Line Ends Here") + atc_set_text_inside("Personhood Main\nTerminus, please get off!") + F.split_looparound_left("E16") +end
\ No newline at end of file diff --git a/m4/nodes/(4049,24,5652).lua b/m4/nodes/(4045,24,5650).lua index 037b135..037b135 100644 --- a/m4/nodes/(4049,24,5652).lua +++ b/m4/nodes/(4045,24,5650).lua diff --git a/m4/nodes/(4542,11,6809).lua b/m4/nodes/(4536,11,6814).lua index 67b31a2..dceeeea 100644 --- a/m4/nodes/(4542,11,6809).lua +++ b/m4/nodes/(4536,11,6814).lua @@ -1,4 +1,4 @@ -- Poor Man's ARS -if event.train and get_rc() == "E16_poor_mans_ars" then +if event.train and get_line() == "E16" then set_route("Btw-E16-behelf", "E16Turnback") end
\ No newline at end of file diff --git a/m4/nodes/(4538,11,6814).lua b/m4/nodes/(4538,11,6814).lua new file mode 100644 index 0000000..1c5af49 --- /dev/null +++ b/m4/nodes/(4538,11,6814).lua @@ -0,0 +1,6 @@ +if (event.train) and (F.get_line_safe() == "E16") then +-- F.print_length() + atc_set_text_outside("[E16] Line Ends Here") + atc_set_text_inside("By The Way\nTerminus, please get off!") + F.split_looparound_right("E16") +end
\ No newline at end of file diff --git a/m4/nodes/(4539,11,6809).lua b/m4/nodes/(4539,11,6809).lua deleted file mode 100644 index c42277b..0000000 --- a/m4/nodes/(4539,11,6809).lua +++ /dev/null @@ -1,2 +0,0 @@ -atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail") -F.split_looparound_left("E16")
\ No newline at end of file diff --git a/m4/nodes/(4568,11,6809).lua b/m4/nodes/(4579,11,6814).lua index 0e0dc9c..0e0dc9c 100644 --- a/m4/nodes/(4568,11,6809).lua +++ b/m4/nodes/(4579,11,6814).lua diff --git a/m4/nodes/(5397,13,6916).lua b/m4/nodes/(5397,13,6916).lua new file mode 100644 index 0000000..59bcdf6 --- /dev/null +++ b/m4/nodes/(5397,13,6916).lua @@ -0,0 +1,4 @@ +if event.train and get_line()=="E16" then +return +--atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail") +end
\ No newline at end of file diff --git a/nlvcross/nodes/(1683,26,8220).lua b/nlvcross/nodes/(1621,6,8220).lua index a2d877b..a2d877b 100644 --- a/nlvcross/nodes/(1683,26,8220).lua +++ b/nlvcross/nodes/(1621,6,8220).lua diff --git a/nlvcross/nodes/(1609,6,8217).lua b/nlvcross/nodes/(1621,6,8223).lua index c3a20cf..c3a20cf 100644 --- a/nlvcross/nodes/(1609,6,8217).lua +++ b/nlvcross/nodes/(1621,6,8223).lua diff --git a/pad/init_code.lua b/pad/init_code.lua new file mode 100644 index 0000000..5996fe3 --- /dev/null +++ b/pad/init_code.lua @@ -0,0 +1,118 @@ +if event.init then + local accounts = {} + S.acc = S.acc or accounts +end + +F.ack = function(n, c) + local r + local acc_n + + if n ~= nil and c ~= nil then + acc_n = S.acc and S.acc[n] + if acc_n then + r = S.acc[n][c] + end + + if r ~= nil and r > 0 then + S.acc[n][c] = S.acc[n][c] - 1 + end + end + + return r +end + +F.ack2 = function(n, c) + local r + local acc_n + + if n ~= nil and c ~= nil then + acc_n = S.acc and S.acc[n] + if acc_n then + r = S.acc[n][c] + end + end + + return r +end + +F.cac = function(n) + local c = 0 + + if n ~= nil and S.acc[n] ~= nil then + for _ in pairs(S.acc[n]) do + c = c + 1 + end + end + + return c +end + +F.adc = function(n, c, a) + local s + + if n ~= nil and c ~= nil then + acc_n = S.acc and S.acc[n] + + if not acc_n then + S.acc[n] = {} + end + S.acc[n][c] = a + + if not S.acc[n][c] then + s = false + else + s = true + end + end + + return s +end + +F.ick = function (m) + local wm, au, out, r + local a, b, c, d + + if m ~= nil then + a = m:find("\\u0003watermark\\u0002") + c = m:find("\\u0003owner\\u0002") + end + + if a ~= nil then + wm = m:sub(a+21) + end + + if c ~= nil then + au = m:sub(c+17) + end + + if wm ~= nil then + b = wm:find("\\u0003") + if b then + wm = wm:sub(1, b - 1) + end + end + + if au ~= nil then + d = au:find("\\u0003") + if d then + au = au:sub(1, d - 1) + end + if au and au:sub(-9) == "(printed)" then + au = au:sub(1, -11) + end + end + + if au ~= nil and wm ~= nil then + r = F.ack(au, wm) + else + return "ERR:Not a valid transport pass" + end + + if r ~= nil and r > 0 then + out = "ACC:" .. tostring(r-1) .. " remaining uses" + else + out = "ERR:No remaining uses. Please top-up." + end + + return out +end
\ No newline at end of file diff --git a/pad/nodes/(-1053,4,-3352).lua b/pad/nodes/(-1053,4,-3352).lua new file mode 100644 index 0000000..6d0c5aa --- /dev/null +++ b/pad/nodes/(-1053,4,-3352).lua @@ -0,0 +1,29 @@ +local OPENER = {x=-1055,y=1,z=-3352} + +if event.type == "digiline" then + local catch = event + local prefix = catch.msg:sub(1, 4) + local message, r_prefix + + if catch.channel == "Fla" and prefix == "uput" then + message = F.ick(catch.msg) + + if message ~= nil then + r_prefix = message:sub(1, 3) + end + + if r_prefix ~= nil then + if r_prefix == "ACC" then + interrupt(5) + interrupt_pos(OPENER, "open") + end + digiline_send("pref_sc", message:sub(5)) + end + else + interrupt(5) + end +end + +if event.type == "int" then + digiline_send("pref_sc", "Please insert your transport pass below") +end diff --git a/pad/nodes/(-1053,7,-3336).lua b/pad/nodes/(-1053,7,-3336).lua new file mode 100644 index 0000000..f9bc218 --- /dev/null +++ b/pad/nodes/(-1053,7,-3336).lua @@ -0,0 +1,56 @@ +function printLcd(t) + local str = "" + for _, i in ipairs(t) do + str = str .. i .. "\n" + end + + digiline_send("lcd", str) +end + +if not time_table then time_table = {} end + +if event.ext_int then + local catch = event.message + + if catch[1] == "arr1" then + time_table[catch[2]] = 25 + elseif catch[1] == "arr2" then + time_table[catch[2]] = 45 + elseif catch[1] == "arr3" then + + elseif catch[1] == "dep1" then + time_table[catch[2]] = 210 + elseif catch[1] == "dep2" then + time_table[catch[2]] = 180 + elseif catch[1] == "dep3" then + elseif catch[1] == "arr" then + time_table[catch[2]] = 0 + end +elseif event.int and event.msg == "d" then + txt = {" === Next trains ==="} + for i, j in pairs(time_table) do + local approx = "" + + if j > 0 then + time_table[i] = time_table[i] - 5 + end + + if j < 15 then + approx = ">>" + elseif j < 60 then + approx = j .. "s" + else + approx = math.floor(j / 60) .. "m" + end + + table.insert(txt, string.format("Lighthouse %s", approx)) + end + + printLcd(txt) +elseif event.punch then + time_table = {} + digiline_send("lcd", "This is a test") +end + +interrupt_safe(5, "d") + diff --git a/pad/nodes/(-1054,4,-3333).lua b/pad/nodes/(-1054,4,-3333).lua new file mode 100644 index 0000000..18a9d4f --- /dev/null +++ b/pad/nodes/(-1054,4,-3333).lua @@ -0,0 +1,29 @@ +local OPENER = {x=-1055,y=1,z=-3333} + +if event.type == "digiline" then + local catch = event + local prefix = catch.msg:sub(1, 4) + local message, r_prefix + + if catch.channel == "Fla" and prefix == "uput" then + message = F.ick(catch.msg) + + if message ~= nil then + r_prefix = message:sub(1, 3) + end + + if r_prefix ~= nil then + if r_prefix == "ACC" then + interrupt(5) + interrupt_pos(OPENER, "open") + end + digiline_send("pref_sc", message:sub(5)) + end + else + interrupt(5) + end +end + +if event.type == "int" then + digiline_send("pref_sc", "Please insert your transport pass below") +end
\ No newline at end of file diff --git a/pad/nodes/(-1055,1,-3333).lua b/pad/nodes/(-1055,1,-3333).lua new file mode 100644 index 0000000..dcad264 --- /dev/null +++ b/pad/nodes/(-1055,1,-3333).lua @@ -0,0 +1,3 @@ +if event.type == "ext_int" and event.message == "open" then + digiline_send("open", "on") +end
\ No newline at end of file diff --git a/pad/nodes/(-1055,1,-3352).lua b/pad/nodes/(-1055,1,-3352).lua new file mode 100644 index 0000000..dcad264 --- /dev/null +++ b/pad/nodes/(-1055,1,-3352).lua @@ -0,0 +1,3 @@ +if event.type == "ext_int" and event.message == "open" then + digiline_send("open", "on") +end
\ No newline at end of file diff --git a/pad/nodes/(-1061,1,-3321).lua b/pad/nodes/(-1061,1,-3321).lua new file mode 100644 index 0000000..0c6783a --- /dev/null +++ b/pad/nodes/(-1061,1,-3321).lua @@ -0,0 +1,5 @@ +if event.type == "train" then + interrupt_pos(POS(-890,-5,-3154), {"arr2", event.id}) + interrupt_pos(POS(-1208,0,-3337), {"dep2", event.id}) + interrupt_pos(POS(-1053,7,-3336), {"dep1", event.id}) +end
\ No newline at end of file diff --git a/pad/nodes/(-1107,-5,-3242).lua b/pad/nodes/(-1107,-5,-3242).lua new file mode 100644 index 0000000..9492c11 --- /dev/null +++ b/pad/nodes/(-1107,-5,-3242).lua @@ -0,0 +1,4 @@ +if event.type == "train" then + interrupt_pos(POS(-890,-5,-3154), {"dep2", event.id}) + interrupt_pos(POS(-1208,0,-3337), {"arr1", event.id}) +end
\ No newline at end of file diff --git a/pad/nodes/(-1191,-5,-3294).lua b/pad/nodes/(-1191,-5,-3294).lua new file mode 100644 index 0000000..ee184b6 --- /dev/null +++ b/pad/nodes/(-1191,-5,-3294).lua @@ -0,0 +1,4 @@ +if event.type == "train" then + interrupt_pos(POS(-1208,0,-3337), {"dep1", event.id}) + interrupt_pos(POS(-1053,7,-3336), {"arr2", event.id}) +end
\ No newline at end of file diff --git a/pad/nodes/(-1208,0,-3337).lua b/pad/nodes/(-1208,0,-3337).lua new file mode 100644 index 0000000..8d6cdfe --- /dev/null +++ b/pad/nodes/(-1208,0,-3337).lua @@ -0,0 +1,56 @@ +function printLcd(t) + local str = "" + for _, i in ipairs(t) do + str = str .. i .. "\n" + end + + digiline_send("lcd", str) +end + +if not time_table then time_table = {} end + +if event.ext_int then + local catch = event.message + + if catch[1] == "arr1" then + time_table[catch[2]] = 15 + elseif catch[1] == "arr2" then + time_table[catch[2]] = 45 + elseif catch[1] == "arr3" then + + elseif catch[1] == "dep1" then + time_table[catch[2]] = 210 + elseif catch[1] == "dep2" then + time_table[catch[2]] = 140 + elseif catch[1] == "dep3" then + elseif catch[1] == "arr" then + time_table[catch[2]] = 0 + end +elseif event.int and event.msg == "d" then + txt = {" === Next trains ==="} + for i, j in pairs(time_table) do + local approx = "" + + if j > 0 then + time_table[i] = time_table[i] - 5 + end + + if j < 15 then + approx = ">>" + elseif j < 60 then + approx = j .. "s" + else + approx = math.floor(j / 60) .. "m" + end + + table.insert(txt, string.format("Flatcoast %s", approx)) + end + + printLcd(txt) +elseif event.punch then + time_table = {} + digiline_send("lcd", "Initializing TTP...") +end + +interrupt_safe(5, "d") + diff --git a/pad/nodes/(-1210,-3,-3345).lua b/pad/nodes/(-1210,-3,-3345).lua new file mode 100644 index 0000000..4d23b39 --- /dev/null +++ b/pad/nodes/(-1210,-3,-3345).lua @@ -0,0 +1,29 @@ +local OPENER = {x=-1210,y=-6,z=-3345} + +if event.type == "digiline" then + local catch = event + local prefix = catch.msg:sub(1, 4) + local message, r_prefix + + if catch.channel == "Gre" and prefix == "uput" then + message = F.ick(catch.msg) + + if message ~= nil then + r_prefix = message:sub(1, 3) + end + + if r_prefix ~= nil then + if r_prefix == "ACC" then + interrupt(5) + interrupt_pos(OPENER, "open") + end + digiline_send("pref_sc", message:sub(5)) + end + else + interrupt(5) + end +end + +if event.type == "int" then + digiline_send("pref_sc", "Please insert your transport pass below") +end
\ No newline at end of file diff --git a/pad/nodes/(-1210,-6,-3345).lua b/pad/nodes/(-1210,-6,-3345).lua new file mode 100644 index 0000000..dcad264 --- /dev/null +++ b/pad/nodes/(-1210,-6,-3345).lua @@ -0,0 +1,3 @@ +if event.type == "ext_int" and event.message == "open" then + digiline_send("open", "on") +end
\ No newline at end of file diff --git a/pad/nodes/(-4,19,-99).lua b/pad/nodes/(-4,19,-99).lua new file mode 100644 index 0000000..a07fd58 --- /dev/null +++ b/pad/nodes/(-4,19,-99).lua @@ -0,0 +1,3 @@ +if event.ext_int then + digiline_send("upgr", event.message) +end
\ No newline at end of file diff --git a/pad/nodes/(-4,3,-100).lua b/pad/nodes/(-4,3,-100).lua new file mode 100644 index 0000000..9f3f08c --- /dev/null +++ b/pad/nodes/(-4,3,-100).lua @@ -0,0 +1,83 @@ +if event.punch then + local i = { + "mesecons_materials:silicon", + "default:iron_lump", + "default:copper_lump", + "technic:lead_lump" + } + local t = { type="set", + offer={ + [1] = {give="currency:minegeld_5", give_count=1, pay=i[1], pay_count=25}, + [2] = {give="currency:minegeld_5", give_count=1, pay=i[2], pay_count=7}, + [3] = {give="currency:minegeld_5", give_count=1, pay=i[3], pay_count=6}, + [4] = {give="currency:minegeld_5", give_count=1, pay=i[4], pay_count=5}, + } + } + + interrupt_pos(POS(-4,19,-99), {"mer_s9", t}) +end + +--[[ + + mer_s1 + { type="set", + offer={ + [1] = {give="currency:minegeld", give_count=1, pay="default:cobble", pay_count=99}, + [2] = {give="currency:minegeld", give_count=2, pay="default:mossycobble", pay_count=99}, + [3] = {give="currency:minegeld", give_count=4, pay="default:clay", pay_count=99}, + [4] = {give="currency:minegeld", give_count=1, pay="default:gravel", pay_count=99}, + } + } + + + mer_s2 + { type="set", + offer={ + [1] = {give="currency:minegeld", give_count=1, pay="default:grass_1", pay_count=20}, + [2] = {give="currency:minegeld", give_count=1, pay="default:dry_grass_1", pay_count=20}, + [3] = {give="currency:minegeld", give_count=1, pay="default:junglegrass", pay_count=50}, + [4] = {give="currency:minegeld", give_count=1, pay="ethereal:dry_shrub", pay_count=50}, + } + } + mer_s3 + "ethereal:sponge_wet", + "default:coral_skeleton", + "ethereal:crystal_spike", + "ethereal:fire_flower" + + mer_s4 + "default:papyrus", + "ethereal:bamboo", + "ethereal:bush", + "ethereal:vine" + + mer_s5 + "default:leaves", + "default:jungleleaves", + "ethereal:bamboo_leaves", + "ethereal:orange_leaves" + + mer_s6 + "mobs:blood", + "mobs:honey", + "mobs:hairball", + "mobs:intestines" + + mer_s7 + "technic:plastic_clean", + "technic:rubber", + "technic:raw_latex", + "technic:graphite" + + mer_s8 + "technic:aspirin_pill", + "technic:silicon_wafer", + "technic:doped_silicon_wafer", + "technic:sulfur_lump" + + mer_s10 + "ethereal:blue_marble", + "technic:marble", + "technic:granite", + "ethereal:etherium_dust" +]]--
\ No newline at end of file diff --git a/pad/nodes/(-860,-5,-3265).lua b/pad/nodes/(-860,-5,-3265).lua new file mode 100644 index 0000000..18502c2 --- /dev/null +++ b/pad/nodes/(-860,-5,-3265).lua @@ -0,0 +1,4 @@ +if event.type == "train" then + interrupt_pos(POS(-890,-5,-3154), {"arr1", event.id}) + interrupt_pos(POS(-1053,7,-3336), {"dep2", event.id}) +end
\ No newline at end of file diff --git a/pad/nodes/(-863,-10,-3236).lua b/pad/nodes/(-863,-10,-3236).lua new file mode 100644 index 0000000..afaffa2 --- /dev/null +++ b/pad/nodes/(-863,-10,-3236).lua @@ -0,0 +1,3 @@ +if event.type == "train" then + interrupt_pos(POS(-890,-5,-3154), {"dep1", event.id}) +end
\ No newline at end of file diff --git a/pad/nodes/(-887,-10,-3156).lua b/pad/nodes/(-887,-10,-3156).lua new file mode 100644 index 0000000..c1cfee3 --- /dev/null +++ b/pad/nodes/(-887,-10,-3156).lua @@ -0,0 +1,5 @@ +atc_set_text_outside("Padrana Subway - Greenplain") + +if event.type == "train" then + interrupt_pos(POS(-890,-5,-3154), {event.id, "arr"}) +end
\ No newline at end of file diff --git a/pad/nodes/(-890,-5,-3154).lua b/pad/nodes/(-890,-5,-3154).lua new file mode 100644 index 0000000..74680a0 --- /dev/null +++ b/pad/nodes/(-890,-5,-3154).lua @@ -0,0 +1,56 @@ +function printLcd(t) + local str = "" + for _, i in ipairs(t) do + str = str .. i .. "\n" + end + + digiline_send("lcd", str) +end + +if not time_table then time_table = {} end + +if event.ext_int then + local catch = event.message + + if catch[1] == "arr1" then + time_table[catch[2]] = 15 + elseif catch[1] == "arr2" then + time_table[catch[2]] = 50 + elseif catch[1] == "arr3" then + + elseif catch[1] == "dep1" then + time_table[catch[2]] = 210 + elseif catch[1] == "dep2" then + time_table[catch[2]] = 160 + elseif catch[1] == "dep3" then + elseif catch[1] == "arr" then + time_table[catch[2]] = 0 + end +elseif event.int and event.msg == "d" then + txt = {" === Next trains ==="} + for i, j in pairs(time_table) do + local approx = "" + + if j > 0 then + time_table[i] = time_table[i] - 5 + end + + if j < 15 then + approx = ">>" + elseif j < 60 then + approx = j .. "s" + else + approx = math.floor(j / 60) .. "m" + end + + table.insert(txt, string.format("Greenplain %s", approx)) + end + + printLcd(txt) +elseif event.punch then + time_table = {} + digiline_send("lcd", "Initializing TTP...") +end + +interrupt_safe(5, "d") + diff --git a/pad/nodes/(-897,-11,-3154).lua b/pad/nodes/(-897,-11,-3154).lua new file mode 100644 index 0000000..dcad264 --- /dev/null +++ b/pad/nodes/(-897,-11,-3154).lua @@ -0,0 +1,3 @@ +if event.type == "ext_int" and event.message == "open" then + digiline_send("open", "on") +end
\ No newline at end of file diff --git a/pad/nodes/(-897,-8,-3153).lua b/pad/nodes/(-897,-8,-3153).lua new file mode 100644 index 0000000..13b89b6 --- /dev/null +++ b/pad/nodes/(-897,-8,-3153).lua @@ -0,0 +1,29 @@ +local OPENER = {x=-897,y=-11,z=-3154} + +if event.type == "digiline" then + local catch = event + local prefix = catch.msg:sub(1, 4) + local message, r_prefix + + if catch.channel == "Lig" and prefix == "uput" then + message = F.ick(catch.msg) + + if message ~= nil then + r_prefix = message:sub(1, 3) + end + + if r_prefix ~= nil then + if r_prefix == "ACC" then + interrupt(5) + interrupt_pos(OPENER, "open") + end + digiline_send("pref_sc", message:sub(5)) + end + else + interrupt(5) + end +end + +if event.type == "int" then + digiline_send("pref_sc", "Please insert your transport pass below") +end
\ No newline at end of file diff --git a/pad/nodes/(-928,-5,-3274).lua b/pad/nodes/(-928,-5,-3274).lua new file mode 100644 index 0000000..3171e88 --- /dev/null +++ b/pad/nodes/(-928,-5,-3274).lua @@ -0,0 +1,3 @@ +if event.type == "train" then + interrupt_pos(POS(-1208,0,-3337), {"arr2", event.id}) +end
\ No newline at end of file diff --git a/pad/nodes/(-978,-5,-3264).lua b/pad/nodes/(-978,-5,-3264).lua new file mode 100644 index 0000000..1b812fb --- /dev/null +++ b/pad/nodes/(-978,-5,-3264).lua @@ -0,0 +1,3 @@ +if event.type == "train" then + interrupt_pos(POS(-1053,7,-3336), {"arr1", event.id}) +end
\ No newline at end of file diff --git a/pad/nodes/(-984,10,-3329).lua b/pad/nodes/(-984,10,-3329).lua new file mode 100644 index 0000000..30010d4 --- /dev/null +++ b/pad/nodes/(-984,10,-3329).lua @@ -0,0 +1,38 @@ +if event.type == "punch" then + digiline_send("commit", true) --{name, F.cac(name)}) +end + +if event.channel == "ack" then + local catch = event.msg + name = catch[1] + wm = catch[2] + + if F.ack2(name, wm) then + digiline_send("ack_r", S.acc[name][wm]) + else + digiline_send("ack_r", false) + end +end + +if event.channel == "checkout" then + local catch = event.msg + name = catch[1] + wm = catch[2] + amount = catch[3] + + if F.ack2(name, wm) and amount ~= nil then + S.acc[name][wm] = S.acc[name][wm] + amount + digiline_send("checkout_r", true) + else + digiline_send("checkout_r", false) + end +end + +if event.channel == "create" then + local catch = event.msg + name = catch[1] + wm = catch[2] + am = catch[3] + + F.adc(name, wm, am) +end
\ No newline at end of file diff --git a/subway/init_code.lua b/subway/init_code.lua index cc77426..bf750ca 100644 --- a/subway/init_code.lua +++ b/subway/init_code.lua @@ -231,8 +231,13 @@ end F.stn_union=function(line1, prev1, prev2, this, next, doors, dps, osig, ret_sw, ret_st, nohalt, waittime) if not atc_id then - atc_send("B0") - error("Train has disappeared!") + -- orwell 2025-03-24 + if (event.int and event.message=="ready") then + print(this,": Missing train on ready!") + interrupt(F.rant(), "ready") + end + -- otherwise ignore + return end if not atc_arrow then atc_send("B0") diff --git a/subway/nodes/(-1061,2,-3339).lua b/subway/nodes/(-1061,2,-3339).lua new file mode 100644 index 0000000..ce0766f --- /dev/null +++ b/subway/nodes/(-1061,2,-3339).lua @@ -0,0 +1,5 @@ +atc_set_text_outside("Padrana Subway - Lighthouse") + +if event.type == "train" then + interrupt_pos(POS(-1053,7,-3336), {"arr", event.id}) +end
\ No newline at end of file diff --git a/subway/nodes/(-1213,-5,-3335).lua b/subway/nodes/(-1213,-5,-3335).lua new file mode 100644 index 0000000..14af370 --- /dev/null +++ b/subway/nodes/(-1213,-5,-3335).lua @@ -0,0 +1,5 @@ +atc_set_text_outside("Padrana Subway - Flatcoast") + +if event.type == "train" then + interrupt_pos(POS(-1208,0,-3337), {"arr", event.id}) +end
\ No newline at end of file diff --git a/subway/nodes/(-1392,13,-321).lua b/subway/nodes/(-1392,13,-321).lua deleted file mode 100644 index 4de8346..0000000 --- a/subway/nodes/(-1392,13,-321).lua +++ /dev/null @@ -1 +0,0 @@ -F.stn_return_free("LihXN", "Lhsw", "st")
\ No newline at end of file diff --git a/subway/nodes/(-767,8,-282).lua b/subway/nodes/(-767,8,-282).lua index fcb170e..d36ddb9 100644 --- a/subway/nodes/(-767,8,-282).lua +++ b/subway/nodes/(-767,8,-282).lua @@ -1,2 +1,4 @@ + F.stn("Shn1W", "Jus1W", "Fre1W", "R") + S.line[atc_id]="1" diff --git a/subway/nodes/(10,0,-10).lua b/subway/nodes/(10,0,-10).lua index 447cb5f..37b1da9 100644 --- a/subway/nodes/(10,0,-10).lua +++ b/subway/nodes/(10,0,-10).lua @@ -92,7 +92,7 @@ if du_line then end local line4 = "" if dd_line and nwt then - line4 = "Line "..(dd_line).." - "..nwt.."s" + line4 = "Line "..(dd_line).."- "..nwt.."s" end digiline_send("l14e", line1.." | "..line2.." | "..line3.." | ----------- | "..line4) |
