diff options
author | autocommitter <autocommitter@linux-forks.de> | 2025-09-07 00:00:02 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2025-09-07 00:00:02 +0200 |
commit | 4d10055fd466efa28fbbc95dd259b1f3a57bb453 (patch) | |
tree | 27c0e229a6f6b41dab9728e22f419feeb2111495 | |
parent | 99ae13563b4a28e273f0dee9ed383d52bad248a2 (diff) | |
download | luaatc_envs-4d10055fd466efa28fbbc95dd259b1f3a57bb453.tar.gz luaatc_envs-4d10055fd466efa28fbbc95dd259b1f3a57bb453.tar.bz2 luaatc_envs-4d10055fd466efa28fbbc95dd259b1f3a57bb453.zip |
State at 2025-09-07
34 files changed, 185 insertions, 17 deletions
diff --git a/il_timetable/init_code.lua b/il_timetable/init_code.lua index 159d043..9a1df77 100644 --- a/il_timetable/init_code.lua +++ b/il_timetable/init_code.lua @@ -301,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) @@ -529,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 @@ -546,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) @@ -590,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/(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..4734730 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..8c6dbbf --- /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 = "03;30", --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/(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,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/m4/nodes/(4538,11,6814).lua b/m4/nodes/(4538,11,6814).lua index 2aefefb..b8f7e3c 100644 --- a/m4/nodes/(4538,11,6814).lua +++ b/m4/nodes/(4538,11,6814).lua @@ -1,5 +1,6 @@ if (event.train) and (F.get_line_safe() == "E16") then -- F.print_length() atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail") - F.split_looparound_left("E16") + 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/(5397,13,6916).lua b/m4/nodes/(5397,13,6916).lua index 0bbaca1..59bcdf6 100644 --- a/m4/nodes/(5397,13,6916).lua +++ b/m4/nodes/(5397,13,6916).lua @@ -1,4 +1,4 @@ if event.train and get_line()=="E16" then return -atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail") +--atc_set_text_outside("[E16] Personhood\nvia Grub Valley\nC&C Rail") end
\ No newline at end of file |