diff options
75 files changed, 405 insertions, 68 deletions
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/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 deleted file mode 100644 index 7d57cd6..0000000 --- a/durt/nodes/(-4138,13,-5778).lua +++ /dev/null @@ -1,7 +0,0 @@ -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/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/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/(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/(-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/(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/(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/(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/(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 index 52448e2..c4bed49 100644 --- a/il_timetable/nodes/(4602,9,2181).lua +++ b/il_timetable/nodes/(4602,9,2181).lua @@ -1,5 +1,5 @@ F.ttp_station_display({ - lines = {"E85_N", "E85_S", }, + lines = {"E85_N", "E85_S", "DTLE1_N", "DTLE1_S"}, departure = {}, station = "Morija North", title = "Morija North", 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/(981,21,1053).lua b/il_timetable/nodes/(981,21,1053).lua index be19fda..00928a4 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 = "FAR" -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 9e79f93..a48edb3 100644 --- a/il_timetable/nodes/(981,22,1053).lua +++ b/il_timetable/nodes/(981,22,1053).lua @@ -1,5 +1,5 @@ -- E/W -local tr="E11" +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 00928a4..be19fda 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 = "FAR" +--N/S +local line = "E85" -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/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/(-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/(-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/(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/(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 index e9f1e05..59bcdf6 100644 --- a/m4/nodes/(5397,13,6916).lua +++ b/m4/nodes/(5397,13,6916).lua @@ -1,3 +1,4 @@ if event.train and get_line()=="E16" then -atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail") +return +--atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail") end
\ No newline at end of file |