summaryrefslogtreecommitdiff
path: root/il_timetable
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:51:45 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:51:45 +0200
commit0b14726c5539782a60d2f4beaed2cfca74a50f7a (patch)
tree1de6e16c565f7bb9806552fc587d7eac870b6b00 /il_timetable
downloadluaatc_envs-0b14726c5539782a60d2f4beaed2cfca74a50f7a.tar.gz
luaatc_envs-0b14726c5539782a60d2f4beaed2cfca74a50f7a.tar.bz2
luaatc_envs-0b14726c5539782a60d2f4beaed2cfca74a50f7a.zip
State at 2019-12-13
Diffstat (limited to 'il_timetable')
-rw-r--r--il_timetable/init_code.lua38
-rw-r--r--il_timetable/nodes/(-4248,20,-3104).lua1
-rw-r--r--il_timetable/nodes/(-4248,20,-3107).lua1
-rw-r--r--il_timetable/nodes/(-5301,31,-3188).lua1
-rw-r--r--il_timetable/nodes/(-5595,6,-3553).lua1
-rw-r--r--il_timetable/nodes/(-617,14,-411).lua4
-rw-r--r--il_timetable/nodes/(-626,14,-423).lua3
-rw-r--r--il_timetable/nodes/(-628,14,-399).lua2
-rw-r--r--il_timetable/nodes/(-631,14,-404).lua4
-rw-r--r--il_timetable/nodes/(-863,14,-492).lua9
-rw-r--r--il_timetable/nodes/(118,16,-98).lua3
-rw-r--r--il_timetable/nodes/(1732,27,2924).lua1
-rw-r--r--il_timetable/nodes/(1734,26,2921).lua5
-rw-r--r--il_timetable/nodes/(1735,15,2947).lua7
-rw-r--r--il_timetable/nodes/(241,13,-2039).lua1
-rw-r--r--il_timetable/nodes/(273,13,-2051).lua2
-rw-r--r--il_timetable/nodes/(957,14,1047).lua4
-rw-r--r--il_timetable/nodes/(962,15,1041).lua2
-rw-r--r--il_timetable/nodes/(969,14,1049).lua4
-rw-r--r--il_timetable/nodes/(972,14,1053).lua4
20 files changed, 97 insertions, 0 deletions
diff --git a/il_timetable/init_code.lua b/il_timetable/init_code.lua
new file mode 100644
index 0000000..919b007
--- /dev/null
+++ b/il_timetable/init_code.lua
@@ -0,0 +1,38 @@
+-- init code for LW timetable env
+
+-- stop, scheduled departure every
+-- 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)
+ if event.train then
+ local timenow = os.time()
+ local timerdy = timenow + minstoptime
+ local wait = d_int - ((timerdy-d_off) % d_int)
+ local waitcorr = math.floor(wait*0.66)
+ digiline_send("monitor", "Departure scheduled for: | "..os.date("%H:%M:%S", timenow+wait))
+ atc_send("B0 W O"..doors.." D"..waitcorr.." OCD1"..departcommand)
+ else
+ local timenow = os.time()
+ digiline_send("monitor", "Time: "..os.date("%H:%M:%S", timenow))
+ end
+end
+
+function F.stop_sd_sched(st_name, doors, departcommand, minstoptime, d_int, d_off)
+ if event.train then
+ local time_now = rwt.now()
+ local next_dep_time = rwt.next_rpt(rwt.add(time_now, minstoptime), d_int, d_off)
+ digiline_send("monitor", "Departure scheduled for: | "..rwt.to_string(next_dep_time, true))
+ atc_set_text_inside(st_name.."\nDeparture: "..rwt.to_string(next_dep_time, true))
+ atc_send("B0 W O"..doors)
+ schedule(next_dep_time, "depart")
+ elseif event.schedule then
+ atc_send("OCD1"..departcommand)
+ digiline_send("monitor", "Last Departure: | "..rwt.to_string(rwt.now(), true))
+ atc_set_text_inside("")
+ end
+end
+
+function F.timedisplay()
+digiline_send("time", "Time: | "..rwt.to_string(rwt.now(),true).." | "..os.date("%H:%M:%S"))
+schedule(rwt.next_rpt(rwt.now(),5,0), "")
+end \ No newline at end of file
diff --git a/il_timetable/nodes/(-4248,20,-3104).lua b/il_timetable/nodes/(-4248,20,-3104).lua
new file mode 100644
index 0000000..a8081e9
--- /dev/null
+++ b/il_timetable/nodes/(-4248,20,-3104).lua
@@ -0,0 +1 @@
+atc_set_text_outside("S31 - Asha Cliffs <> Trisiston") \ No newline at end of file
diff --git a/il_timetable/nodes/(-4248,20,-3107).lua b/il_timetable/nodes/(-4248,20,-3107).lua
new file mode 100644
index 0000000..2a723ae
--- /dev/null
+++ b/il_timetable/nodes/(-4248,20,-3107).lua
@@ -0,0 +1 @@
+atc_set_text_outside("E35 - Personhood West <> South Forest <> Trisiston") \ No newline at end of file
diff --git a/il_timetable/nodes/(-5301,31,-3188).lua b/il_timetable/nodes/(-5301,31,-3188).lua
new file mode 100644
index 0000000..3bcd906
--- /dev/null
+++ b/il_timetable/nodes/(-5301,31,-3188).lua
@@ -0,0 +1 @@
+atc_set_text_outside("E3 - Euler Street\n via Trisiston") \ No newline at end of file
diff --git a/il_timetable/nodes/(-5595,6,-3553).lua b/il_timetable/nodes/(-5595,6,-3553).lua
new file mode 100644
index 0000000..3bcd906
--- /dev/null
+++ b/il_timetable/nodes/(-5595,6,-3553).lua
@@ -0,0 +1 @@
+atc_set_text_outside("E3 - Euler Street\n via Trisiston") \ No newline at end of file
diff --git a/il_timetable/nodes/(-617,14,-411).lua b/il_timetable/nodes/(-617,14,-411).lua
new file mode 100644
index 0000000..c766c18
--- /dev/null
+++ b/il_timetable/nodes/(-617,14,-411).lua
@@ -0,0 +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("Main Station", "R", "RSM", 30, 240, 35) \ No newline at end of file
diff --git a/il_timetable/nodes/(-626,14,-423).lua b/il_timetable/nodes/(-626,14,-423).lua
new file mode 100644
index 0000000..fdca82b
--- /dev/null
+++ b/il_timetable/nodes/(-626,14,-423).lua
@@ -0,0 +1,3 @@
+if atc_arrow then
+ atc_set_text_outside("S1 - Origin \nvia Riverside, Onionland")
+end \ No newline at end of file
diff --git a/il_timetable/nodes/(-628,14,-399).lua b/il_timetable/nodes/(-628,14,-399).lua
new file mode 100644
index 0000000..f84dff7
--- /dev/null
+++ b/il_timetable/nodes/(-628,14,-399).lua
@@ -0,0 +1,2 @@
+digiline_send("time", "Time: | "..rwt.to_string(rwt.now()).." | "..os.date("%H:%M:%S"))
+schedule(rwt.next_rpt(rwt.now(),5,0), "") \ No newline at end of file
diff --git a/il_timetable/nodes/(-631,14,-404).lua b/il_timetable/nodes/(-631,14,-404).lua
new file mode 100644
index 0000000..750d82a
--- /dev/null
+++ b/il_timetable/nodes/(-631,14,-404).lua
@@ -0,0 +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("Main Station", "L", "SM", 10, 120, 0) \ No newline at end of file
diff --git a/il_timetable/nodes/(-863,14,-492).lua b/il_timetable/nodes/(-863,14,-492).lua
new file mode 100644
index 0000000..c78f4fb
--- /dev/null
+++ b/il_timetable/nodes/(-863,14,-492).lua
@@ -0,0 +1,9 @@
+
+if flip then
+ atc_set_text_outside("E3 - Sraczka's Village\n via Trisiston")
+ set_rc("E3_Sra")
+else
+ atc_set_text_outside("E3 - Garden of Eden Ferry\n via Trisiston")
+ set_rc("E3_Edf")
+end
+flip = not flip \ No newline at end of file
diff --git a/il_timetable/nodes/(118,16,-98).lua b/il_timetable/nodes/(118,16,-98).lua
new file mode 100644
index 0000000..84d5c2e
--- /dev/null
+++ b/il_timetable/nodes/(118,16,-98).lua
@@ -0,0 +1,3 @@
+if atc_arrow then
+ atc_set_text_outside("S1 - Spawn Main Stn. \nvia Onionland, Riverside")
+end \ No newline at end of file
diff --git a/il_timetable/nodes/(1732,27,2924).lua b/il_timetable/nodes/(1732,27,2924).lua
new file mode 100644
index 0000000..6c2907f
--- /dev/null
+++ b/il_timetable/nodes/(1732,27,2924).lua
@@ -0,0 +1 @@
+F.timedisplay() \ No newline at end of file
diff --git a/il_timetable/nodes/(1734,26,2921).lua b/il_timetable/nodes/(1734,26,2921).lua
new file mode 100644
index 0000000..35358e3
--- /dev/null
+++ b/il_timetable/nodes/(1734,26,2921).lua
@@ -0,0 +1,5 @@
+-- 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", "RSM", 10, 120, 70)
+atc_set_text_outside("E1 - Melinka Town") \ No newline at end of file
diff --git a/il_timetable/nodes/(1735,15,2947).lua b/il_timetable/nodes/(1735,15,2947).lua
new file mode 100644
index 0000000..c30c9cd
--- /dev/null
+++ b/il_timetable/nodes/(1735,15,2947).lua
@@ -0,0 +1,7 @@
+if get_line() == "S14" then
+atc_set_text_outside("S14 - Manaugh Memorial")
+elseif get_line() == "S16" then
+atc_set_text_outside("S16 - Maze")
+elseif get_line() == "S16a" then
+atc_set_text_outside("S16a - Deep Valley Mountain")
+end \ No newline at end of file
diff --git a/il_timetable/nodes/(241,13,-2039).lua b/il_timetable/nodes/(241,13,-2039).lua
new file mode 100644
index 0000000..b3dd9f7
--- /dev/null
+++ b/il_timetable/nodes/(241,13,-2039).lua
@@ -0,0 +1 @@
+set_line("E35") \ No newline at end of file
diff --git a/il_timetable/nodes/(273,13,-2051).lua b/il_timetable/nodes/(273,13,-2051).lua
new file mode 100644
index 0000000..553947c
--- /dev/null
+++ b/il_timetable/nodes/(273,13,-2051).lua
@@ -0,0 +1,2 @@
+F.stop_sd("South Forest", "R", "RSM", 0, 120, 0)
+atc_set_text_outside("E2 - Origin") \ No newline at end of file
diff --git a/il_timetable/nodes/(957,14,1047).lua b/il_timetable/nodes/(957,14,1047).lua
new file mode 100644
index 0000000..1db46f4
--- /dev/null
+++ b/il_timetable/nodes/(957,14,1047).lua
@@ -0,0 +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) \ No newline at end of file
diff --git a/il_timetable/nodes/(962,15,1041).lua b/il_timetable/nodes/(962,15,1041).lua
new file mode 100644
index 0000000..f84dff7
--- /dev/null
+++ b/il_timetable/nodes/(962,15,1041).lua
@@ -0,0 +1,2 @@
+digiline_send("time", "Time: | "..rwt.to_string(rwt.now()).." | "..os.date("%H:%M:%S"))
+schedule(rwt.next_rpt(rwt.now(),5,0), "") \ No newline at end of file
diff --git a/il_timetable/nodes/(969,14,1049).lua b/il_timetable/nodes/(969,14,1049).lua
new file mode 100644
index 0000000..bf63cf8
--- /dev/null
+++ b/il_timetable/nodes/(969,14,1049).lua
@@ -0,0 +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", "L", "RSM", 10, 120, 85) \ No newline at end of file
diff --git a/il_timetable/nodes/(972,14,1053).lua b/il_timetable/nodes/(972,14,1053).lua
new file mode 100644
index 0000000..fde413c
--- /dev/null
+++ b/il_timetable/nodes/(972,14,1053).lua
@@ -0,0 +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", "RSM", 10, 240, 75) \ No newline at end of file