summaryrefslogtreecommitdiff
path: root/il_timetable
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:52:39 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:52:39 +0200
commit12c2357d9966a6498dcaeeb3f141e72b09d01a37 (patch)
tree254a35c39831988c76dddff12c2b90d54b7d327c /il_timetable
parentcfa65d94f1bc9d9e9efe13791711a9ad044a4a67 (diff)
downloadluaatc_envs-12c2357d9966a6498dcaeeb3f141e72b09d01a37.tar.gz
luaatc_envs-12c2357d9966a6498dcaeeb3f141e72b09d01a37.tar.bz2
luaatc_envs-12c2357d9966a6498dcaeeb3f141e72b09d01a37.zip
State at 2021-04-05
Diffstat (limited to 'il_timetable')
-rw-r--r--il_timetable/init_code.lua29
-rw-r--r--il_timetable/nodes/(-457,23,394).lua4
-rw-r--r--il_timetable/nodes/(-640,14,-426).lua8
-rw-r--r--il_timetable/nodes/(1107,16,1951).lua2
-rw-r--r--il_timetable/nodes/(133,11,873).lua4
-rw-r--r--il_timetable/nodes/(957,14,1047).lua15
6 files changed, 32 insertions, 30 deletions
diff --git a/il_timetable/init_code.lua b/il_timetable/init_code.lua
index e44819e..437db63 100644
--- a/il_timetable/init_code.lua
+++ b/il_timetable/init_code.lua
@@ -156,38 +156,33 @@ F.ttp={
CFE_N = {
outside_text = "[CFE] Warmoneaye\nvia Ehlodex, Personhood West, Crystal Farms",
inside_line_desc = "CFE to Warmoneaye",
- stn_display = "CFE Warmoneaye",
+ stn_display = "CFE Warmoneaye ",
},
CFE_S = {
outside_text = "[CFE] Origin\nvia Crystal Farms, Personhood West, Ehlodex",
inside_line_desc = "CFE to Origin",
- stn_display = "CFE Origin",
+ stn_display = "CFE Origin ",
},
NRG_E = {
outside_text = "[NRG] Azena Transirejo",
inside_line_desc = "NRG to Azena Transirejo",
- stn_display = "NRG Azena Transirejo",
+ stn_display = "NRG Azena Trans.",
},
NRG_W = {
outside_text = "[NRG] New Roses Gardens",
inside_line_desc = "NRG to New Roses Gardens",
- stn_display = "NRG New Roses Gardens",
+ stn_display = "NRG N.Roses Gdns",
},
NX_S = {
outside_text = "[NX] Trisiston\nvia Personhood West, Ehlodex, South Forest, Melinka",
inside_line_desc = "NX to Trisiston",
- stn_display = "NX Trisiston",
+ stn_display = "NX Trisiston ",
},
E1_S = {
outside_text = "[E1] Melinka\nvia The Cube, Ehlodex, Spawn Main, Mom Junction",
inside_line_desc = "E1 to Melinka",
- stn_display = "E1 Melinka",
+ stn_display = "E1 Melinka ",
},
- testing = {
- outside_text = "[testing] Sued via Mitte",
- inside_line_desc = "[testing] Sued",
- },
-
}
--[[
@@ -332,6 +327,9 @@ F.ttp_stop({
..rwt.to_string(time_now, true).." Dd"
..rwt.to_string(trn.desired_dep, true).." Da"
..rwt.to_string(next_dep_time, true))
+
+ local delay = rwt.diff(trn.desired_dep, next_dep_time)
+ trn.last_delay = delay
else
atc_set_text_inside(p.stn.."\nAa "
..rwt.to_string(time_now, true).." Dd ? Da"
@@ -432,9 +430,10 @@ local function is_past_station(tstn, stnorder)
end
return true
end
-local function add_train(deptime, line)
+local function add_train(deptime, line, train)
local tent = {dep = deptime, text =
- rwt.to_string(deptime,true).." "..F.ttp[line].stn_display}
+ rwt.to_string(deptime,true).." "..F.ttp[line].stn_display
+ .." +"..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)
@@ -452,7 +451,7 @@ for _,line in ipairs(p.lines) do
if train.timetable == line then
if train.location == p.station and not train.actual_dep then
-- the train is currently standing at this station
- add_train(train.planned_dep, line)
+ add_train(train.planned_dep, line, train)
elseif not is_past_station(train.location, sttp.station_order) then
-- train is still approaching, calculate arrival time
local trav_dep = rwt.add(train.initial_dep, (sttp.travel_times[p.station] or 0) + STOP_TIME)
@@ -463,7 +462,7 @@ for _,line in ipairs(p.lines) do
act_dep = plan_dep
end
end
- add_train(act_dep, line)
+ add_train(act_dep, line, train)
end
end
end
diff --git a/il_timetable/nodes/(-457,23,394).lua b/il_timetable/nodes/(-457,23,394).lua
new file mode 100644
index 0000000..c452301
--- /dev/null
+++ b/il_timetable/nodes/(-457,23,394).lua
@@ -0,0 +1,4 @@
+F.ttp_stop({
+ stn = "Anju Crossing Central",
+ doorside = "L",
+}) \ No newline at end of file
diff --git a/il_timetable/nodes/(-640,14,-426).lua b/il_timetable/nodes/(-640,14,-426).lua
index 0a32291..a67254f 100644
--- a/il_timetable/nodes/(-640,14,-426).lua
+++ b/il_timetable/nodes/(-640,14,-426).lua
@@ -1,3 +1,5 @@
-if event.train then
- F.timetake_end("E1-Psh-Ehl")
-end \ No newline at end of file
+F.ttp_stop({
+ stn = "Spawn Main",
+ doorside = "L",
+ end_of_tt = {CFE_S=true,NX_S=true,E1_S=true},
+}) \ No newline at end of file
diff --git a/il_timetable/nodes/(1107,16,1951).lua b/il_timetable/nodes/(1107,16,1951).lua
index 1d7d775..001186f 100644
--- a/il_timetable/nodes/(1107,16,1951).lua
+++ b/il_timetable/nodes/(1107,16,1951).lua
@@ -1,5 +1,5 @@
F.ttp_stop({
stn = "The Cube",
doorside = "R",
- end_of_tt = {CFE_S=true,NX_S=true,E1_S=true},
+ end_of_tt = {CFE_S=true,NX_S=true},
}) \ No newline at end of file
diff --git a/il_timetable/nodes/(133,11,873).lua b/il_timetable/nodes/(133,11,873).lua
new file mode 100644
index 0000000..4f28e6b
--- /dev/null
+++ b/il_timetable/nodes/(133,11,873).lua
@@ -0,0 +1,4 @@
+F.ttp_stop({
+ stn = "Schwarzschild Street",
+ doorside = "L",
+}) \ No newline at end of file
diff --git a/il_timetable/nodes/(957,14,1047).lua b/il_timetable/nodes/(957,14,1047).lua
index d28a823..5e0be27 100644
--- a/il_timetable/nodes/(957,14,1047).lua
+++ b/il_timetable/nodes/(957,14,1047).lua
@@ -1,11 +1,4 @@
--- d_int: Departure every n seconds (epoch modulo)
--- d_off: Departure time offset
--- function F.stop_sd(st_name, doors, departcommand, minstoptime, d_int, d_off)
-F.stop_sd_sched("Ehlodex", "R", "SM", 10, 60, 0)
-
-if event.train then
- F.timetake_end("E1-Psh-Ehl")
-end
-if depart then
- F.timetake_start("E1-Ehl-Spn")
-end \ No newline at end of file
+F.ttp_stop({
+ stn = "Ehlodex",
+ doorside = "R",
+}) \ No newline at end of file