diff options
-rw-r--r-- | init_code.lua | 2 | ||||
-rw-r--r-- | nodes/(943,14,1025).lua | 1 | ||||
-rw-r--r-- | nodes/(957,14,1047).lua | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/init_code.lua b/init_code.lua index 919b007..313075b 100644 --- a/init_code.lua +++ b/init_code.lua @@ -18,6 +18,7 @@ function F.stop_sd(st_name, doors, departcommand, minstoptime, d_int, d_off) end function F.stop_sd_sched(st_name, doors, departcommand, minstoptime, d_int, d_off) + depart = false 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) @@ -29,6 +30,7 @@ function F.stop_sd_sched(st_name, doors, departcommand, minstoptime, d_int, d_of atc_send("OCD1"..departcommand) digiline_send("monitor", "Last Departure: | "..rwt.to_string(rwt.now(), true)) atc_set_text_inside("") + depart = true end end diff --git a/nodes/(943,14,1025).lua b/nodes/(943,14,1025).lua new file mode 100644 index 0000000..b94fa87 --- /dev/null +++ b/nodes/(943,14,1025).lua @@ -0,0 +1 @@ +setstate("Ehl6ARSPreventer", "cr")
\ No newline at end of file diff --git a/nodes/(957,14,1047).lua b/nodes/(957,14,1047).lua index 1db46f4..74760fd 100644 --- a/nodes/(957,14,1047).lua +++ b/nodes/(957,14,1047).lua @@ -1,4 +1,7 @@ -- 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 +F.stop_sd_sched("Ehlodex", "R", "SM", 10, 60, 0) +if depart then + setstate("Ehl6ARSPreventer", "st") +end
\ No newline at end of file |