diff options
40 files changed, 189 insertions, 51 deletions
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/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/(-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 58ed28c..afbb94b 100644 --- a/auto_yards/nodes/(-2029,19,733).lua +++ b/auto_yards/nodes/(-2029,19,733).lua @@ -1,28 +1,36 @@ 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 - -- direct train to the headshunt to reenter the yard 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 - -- deal with ARC_2nd_EXIT_rc - local rc = F.get_rc_safe():match("ARC_2ND_EXIT_(%S+)") - print(rc) - if rc then - F.remove_rc_match("ARC_2ND_EXIT_%S+") - F.add_rc(rc) - print(F.get_rc_safe()) - atc_set_ars_disable(false) - atc_send("SM") - return - end -- disregard light exit locos if F.has_rc(yard_id.."_LIGHT_EXIT") then F.remove_rc(yard_id.."_LIGHT_EXIT") 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/durt/nodes/(-1973,16,800).lua b/durt/nodes/(-1973,16,800).lua index e886d2b..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 + -- 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 = { -- collect wagons from BYARD, and park loco in loco siding if no departures at ARC + 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/(-4138,13,-5778).lua b/durt/nodes/(-4138,13,-5778).lua new file mode 100644 index 0000000..7d57cd6 --- /dev/null +++ b/durt/nodes/(-4138,13,-5778).lua @@ -0,0 +1,7 @@ +print(rwt.to_string(rwt.now())) +local fc_array = get_fc() +for idx,list in ipairs(fc_array) do + fc_array[idx] = list:split("!",true) +end +print(fc_array) +print(get_fc_index())
\ 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 de0abbe..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 = "12;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/(30856,15,1814).lua b/far/nodes/(30856,15,1814).lua index 21c8a05..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 = "12;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 bdcac10..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 = "12;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 60180b5..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 = "12;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/(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/(5326,32,2321).lua b/far/nodes/(5326,32,2321).lua new file mode 100644 index 0000000..8a91c1c --- /dev/null +++ b/far/nodes/(5326,32,2321).lua @@ -0,0 +1,3 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5326,32,2321), "west") 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..25280d4 --- /dev/null +++ b/far/nodes/(5409,33,2339).lua @@ -0,0 +1,3 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5409,33,2339), "west") diff --git a/far/nodes/(5434,33,2329).lua b/far/nodes/(5434,33,2329).lua new file mode 100644 index 0000000..d550a23 --- /dev/null +++ b/far/nodes/(5434,33,2329).lua @@ -0,0 +1,3 @@ +-- far_luaatctrack_spot_check_01.lua + +F.save_train(POS(5434,33,2329), "east") 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/nodes/(4602,9,2181).lua b/il_timetable/nodes/(4602,9,2181).lua new file mode 100644 index 0000000..52448e2 --- /dev/null +++ b/il_timetable/nodes/(4602,9,2181).lua @@ -0,0 +1,7 @@ +F.ttp_station_display({ + lines = {"E85_N", "E85_S", }, + departure = {}, + station = "Morija North", + title = "Morija North", + display1 = "d1", +})
\ 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..9e79f93 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="E11" 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..00928a4 100644 --- a/il_timetable/nodes/(982,21,1053).lua +++ b/il_timetable/nodes/(982,21,1053).lua @@ -1,5 +1,5 @@ --W/E -local line = "E16" +local line = "FAR" lines = F.ttp_info_times(line.."_W", "00;00") linestr = F.ttp_info_trains(line.."_W", "00;00") 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 860f22a..493aeb1 100644 --- a/il_timetable/nodes/(983,22,1053).lua +++ b/il_timetable/nodes/(983,22,1053).lua @@ -1 +1 @@ -S.ttt["506708"] = nil
\ No newline at end of file +S.ttt["732702"] = nil
\ No newline at end of file diff --git a/m4/nodes/(-1524,-11,-4611).lua b/m4/nodes/(-1524,-11,-4611).lua index 7042980..6272a7b 100644 --- a/m4/nodes/(-1524,-11,-4611).lua +++ b/m4/nodes/(-1524,-11,-4611).lua @@ -1,3 +1,3 @@ if get_line()=="52" then - atc_set_text_outside("Line 52 - Olo Beach\nVia: Abyss Temple, Town of Abyss, Durai Resort") + atc_set_text_outside("Line 52 - Olo Beach") end
\ No newline at end of file diff --git a/m4/nodes/(-1967,-11,-4415).lua b/m4/nodes/(-1967,-11,-4415).lua index 17aa64e..afb0335 100644 --- a/m4/nodes/(-1967,-11,-4415).lua +++ b/m4/nodes/(-1967,-11,-4415).lua @@ -1,3 +1,3 @@ if get_line()=="52" then - atc_set_text_outside("Line 52 - Merliansas Ruins\nVia: Town of Abyss, Aurlsamy Nagar, Wesley Beach") + atc_set_text_outside("Line 52 - Merliansas Ruins") 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/(5397,13,6916).lua b/m4/nodes/(5397,13,6916).lua new file mode 100644 index 0000000..e9f1e05 --- /dev/null +++ b/m4/nodes/(5397,13,6916).lua @@ -0,0 +1,3 @@ +if event.train and get_line()=="E16" then +atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail") +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/(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) |