summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:55:01 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:55:01 +0200
commit8ea6f01d7499110bddc730cd1916c3c63a1a8a7b (patch)
tree52d57656e029bda2dbce0d17e77d7a6318c28fb6
parentcaf32a229dd58e96a8f66070352d6aae7e700593 (diff)
downloadluaatc_envs-8ea6f01d7499110bddc730cd1916c3c63a1a8a7b.tar.gz
luaatc_envs-8ea6f01d7499110bddc730cd1916c3c63a1a8a7b.tar.bz2
luaatc_envs-8ea6f01d7499110bddc730cd1916c3c63a1a8a7b.zip
State at 2021-11-07
-rw-r--r--durt/nodes/(-4126,6,-5691).lua20
-rw-r--r--durt/nodes/(-4127,5,-5624).lua24
2 files changed, 44 insertions, 0 deletions
diff --git a/durt/nodes/(-4126,6,-5691).lua b/durt/nodes/(-4126,6,-5691).lua
new file mode 100644
index 0000000..19d83df
--- /dev/null
+++ b/durt/nodes/(-4126,6,-5691).lua
@@ -0,0 +1,20 @@
+if atc_arrow then
+ if get_rc():match("DLG_shunt") then
+ atc_send("BBWRSM")
+ F.remove_rc({"DLG_shunt"},true)
+ else
+ atc_send("BB")
+ end
+end
+
+if event.channel=="train_ctl" and event.msg=="send" then
+ if not atc_id or not atc_arrow then
+ digiline_send("error","Error "..os.time().."\nArrow:"..tostring(atc_arrow).."\nID:"..tostring(atc_id))
+ return
+ end
+ atc_send("S3")
+ set_rc((get_rc() or "").." DLG_shunt")
+ split_at_index(2,"BB")
+ set_autocouple()
+ return
+end \ No newline at end of file
diff --git a/durt/nodes/(-4127,5,-5624).lua b/durt/nodes/(-4127,5,-5624).lua
new file mode 100644
index 0000000..d30218f
--- /dev/null
+++ b/durt/nodes/(-4127,5,-5624).lua
@@ -0,0 +1,24 @@
+local lights = {
+ POS(-4131,5,-5623),
+ POS(-4127,5,-5623),
+ POS(-4127,5,-5617),
+ POS(-4131,5,-5617)
+}
+
+if event.train then
+ if atc_arrow then
+ schedule_in(";05",true)
+ return
+ end
+end
+
+if event.schedule then
+ if atc_id then
+ schedule_in(";05",true)
+ return
+ else
+ for _,v in pairs(lights) do
+ setstate(v,"off")
+ end
+ end
+end \ No newline at end of file