diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:53:49 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:53:49 +0200 |
commit | 7122450e716aa4ef98f8af8579953a0bfc0caff0 (patch) | |
tree | f08f713f9e27b26d97b4145a5420d3491a0d115d | |
parent | f9e81e14be7244d3c298f8e578feb9a8b335c711 (diff) | |
download | luaatc_envs-7122450e716aa4ef98f8af8579953a0bfc0caff0.tar.gz luaatc_envs-7122450e716aa4ef98f8af8579953a0bfc0caff0.tar.bz2 luaatc_envs-7122450e716aa4ef98f8af8579953a0bfc0caff0.zip |
State at 2021-08-01
-rw-r--r-- | durt/nodes/(-4128,5,-5630).lua | 21 | ||||
-rw-r--r-- | durt/nodes/(-4129,5,-5630).lua | 21 | ||||
-rw-r--r-- | durt/nodes/(-4129,9,-5588).lua | 29 | ||||
-rw-r--r-- | durt/nodes/(-4130,5,-5630).lua | 21 | ||||
-rw-r--r-- | durt/nodes/(-4132,6,-5690).lua | 20 |
5 files changed, 109 insertions, 3 deletions
diff --git a/durt/nodes/(-4128,5,-5630).lua b/durt/nodes/(-4128,5,-5630).lua new file mode 100644 index 0000000..ef978ad --- /dev/null +++ b/durt/nodes/(-4128,5,-5630).lua @@ -0,0 +1,21 @@ +local pt = POS(-4129,5,-5628) +local bt = POS(-4132,4,-5626) +local dir = "l" +if event.train then + if atc_arrow then + setstate(pt,dir) + setstate(bt,"on") + atc_send("S5") + schedule_in(";05",true) + end +end + +if event.schedule then + if atc_id then + schedule_in(";05",true) + return + else + setstate(bt,"off") + return + end +end
\ No newline at end of file diff --git a/durt/nodes/(-4129,5,-5630).lua b/durt/nodes/(-4129,5,-5630).lua new file mode 100644 index 0000000..26a4ecb --- /dev/null +++ b/durt/nodes/(-4129,5,-5630).lua @@ -0,0 +1,21 @@ +local pt = POS(-4129,5,-5628) +local bt = POS(-4132,4,-5626) +local dir = "s" +if event.train then + if atc_arrow then + setstate(pt,dir) + setstate(bt,"on") + atc_send("S5") + schedule_in(";05",true) + end +end + +if event.schedule then + if atc_id then + schedule_in(";05",true) + return + else + setstate(bt,"off") + return + end +end
\ No newline at end of file diff --git a/durt/nodes/(-4129,9,-5588).lua b/durt/nodes/(-4129,9,-5588).lua index 2dd69c1..44e6501 100644 --- a/durt/nodes/(-4129,9,-5588).lua +++ b/durt/nodes/(-4129,9,-5588).lua @@ -4,9 +4,32 @@ local lights = { POS(-4127,5,-5617), POS(-4131,5,-5617) } +local pt = POS(-4129,5,-5628) +local bt = POS(-4132,4,-5626) -if event.train and atc_arrow then - for _,v in pairs(lights) do - setstate(v,"on") +if event.train then + if atc_arrow then + for _,v in pairs(lights) do + setstate(v,"on") + end + if getstate(bt)=="on" then + atc_send("BB") + schedule_in(";05",true) + else + setstate(pt,"r") + atc_send("S3") + end + else + atc_send("S3D5S0WRD1S3") end end + +if event.schedule then + if getstate(bt)=="on" then + atc_send("BB") + schedule_in(";05",true) + else + setstate(pt,"r") + atc_send("S3") + end +end
\ No newline at end of file diff --git a/durt/nodes/(-4130,5,-5630).lua b/durt/nodes/(-4130,5,-5630).lua new file mode 100644 index 0000000..0045f17 --- /dev/null +++ b/durt/nodes/(-4130,5,-5630).lua @@ -0,0 +1,21 @@ +local pt = POS(-4129,5,-5628) +local bt = POS(-4132,4,-5626) +local dir = "r" +if event.train then + if atc_arrow then + setstate(pt,dir) + setstate(bt,"on") + atc_send("S5") + schedule_in(";05",true) + end +end + +if event.schedule then + if atc_id then + schedule_in(";05",true) + return + else + setstate(bt,"off") + return + end +end
\ No newline at end of file diff --git a/durt/nodes/(-4132,6,-5690).lua b/durt/nodes/(-4132,6,-5690).lua new file mode 100644 index 0000000..ab62d6c --- /dev/null +++ b/durt/nodes/(-4132,6,-5690).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 atc_arrow then + digiline_send("error","Error "..os.time()) + 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 |