From 08b2223c5d433a08b72f68754af480c515094079 Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 22 Apr 2024 15:03:15 +0200 Subject: State at 2023-11-22 --- il_timetable/init_code.lua | 13 ++++++++----- il_timetable/nodes/(-1925,13,-4577).lua | 2 +- il_timetable/nodes/(1984,41,8404).lua | 4 ++++ il_timetable/nodes/(773,8,132).lua | 9 +++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 il_timetable/nodes/(1984,41,8404).lua create mode 100644 il_timetable/nodes/(773,8,132).lua (limited to 'il_timetable') diff --git a/il_timetable/init_code.lua b/il_timetable/init_code.lua index 42b3509..59cf8a2 100644 --- a/il_timetable/init_code.lua +++ b/il_timetable/init_code.lua @@ -261,10 +261,12 @@ function F.ttp_begin(p) last_delay = 0, } -- if no travel times are available yet, set this train as recording - if not tti.travel_times or p.force_tt_reset then + if not tti.travel_times or p.force_tt_reset or tti.force_tt_reset then tti.travel_times = {} tti.station_order = {p.stn} tti.recording_train = atc_id + tti.force_tt_reset = false + print(atc_id,"starting TT recording for",p.tt) elseif tti.recording_train == atc_id then tti.recording_train = nil end @@ -365,6 +367,7 @@ F.ttp_stop({ if tti.recording_train == atc_id then -- we are recording. save travel time tti.travel_times[p.stn] = rwt.diff(trn.initial_dep or 0, time_now) + print(atc_id," for ",p.tt,"at",p.stn,"-> travel time",rwt.to_string(tti.travel_times[p.stn])) tti.station_order[#tti.station_order+1] = p.stn atc_set_text_inside(p.stn.."\nRec TT " ..rwt.to_string(tti.travel_times[p.stn], true).." Da" @@ -420,14 +423,14 @@ function F.ttp_info_trains(tt, starttime) if trn.actual_dep then p[#p+1] = ("Trn "..tid.. " after "..trn.location.. - " Dd "..rwt.to_string(trn.desired_dep, true).. + " Dd "..rwt.to_string(trn.desired_dep or 0, true).. " Da "..rwt.to_string(trn.actual_dep, true).. - " Delay "..rwt.to_string(trn.last_delay)) + " Delay "..rwt.to_string(trn.last_delay or "59;59")) else p[#p+1] = ("Trn "..tid.. " at "..trn.location.. - " Dd "..rwt.to_string(trn.desired_dep, true).. - " Delay "..rwt.to_string(trn.last_delay)) + " Dd "..rwt.to_string(trn.desired_dep or 0, true).. + " Delay "..rwt.to_string(trn.last_delay or "59;59")) end end end diff --git a/il_timetable/nodes/(-1925,13,-4577).lua b/il_timetable/nodes/(-1925,13,-4577).lua index a1d7a28..fa700e6 100644 --- a/il_timetable/nodes/(-1925,13,-4577).lua +++ b/il_timetable/nodes/(-1925,13,-4577).lua @@ -8,7 +8,7 @@ F.ttp_begin({ doorside = "R", reverse = true, only_lines = { E1 = true }, - force_tt_reset = true, + force_tt_reset = false, }) if event.train then diff --git a/il_timetable/nodes/(1984,41,8404).lua b/il_timetable/nodes/(1984,41,8404).lua new file mode 100644 index 0000000..6e23563 --- /dev/null +++ b/il_timetable/nodes/(1984,41,8404).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/(773,8,132).lua b/il_timetable/nodes/(773,8,132).lua new file mode 100644 index 0000000..cc8b8cb --- /dev/null +++ b/il_timetable/nodes/(773,8,132).lua @@ -0,0 +1,9 @@ +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 + doorside = "R", + only_lines = {XN=true}, + force_tt_reset = false, +}) \ No newline at end of file -- cgit v1.2.3