diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:17 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:17 +0200 |
commit | dd021c155983d19fed0704976e85b060180a4c37 (patch) | |
tree | b2be17de2bb8076dc4138bf1ef05e1237db8e76e /durt/nodes/(-2364,15,-1360).lua | |
parent | 286944c0c92f2f08c1d7d664509099425442f240 (diff) | |
download | luaatc_envs-dd021c155983d19fed0704976e85b060180a4c37.tar.gz luaatc_envs-dd021c155983d19fed0704976e85b060180a4c37.tar.bz2 luaatc_envs-dd021c155983d19fed0704976e85b060180a4c37.zip |
State at 2022-05-15
Diffstat (limited to 'durt/nodes/(-2364,15,-1360).lua')
-rw-r--r-- | durt/nodes/(-2364,15,-1360).lua | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/durt/nodes/(-2364,15,-1360).lua b/durt/nodes/(-2364,15,-1360).lua new file mode 100644 index 0000000..9abfaad --- /dev/null +++ b/durt/nodes/(-2364,15,-1360).lua @@ -0,0 +1,46 @@ +local pts = { + north={ + pos=POS(-2358,15,-1329), + lined="st" + }, + south={ + pos=POS(-2358,15,-1361), + lined="st" + }, +} +local set_dir = function(dir) + for _,v in pairs(pts) do + setstate(v.pos,(dir==((true and v.lined=="st") or false) and "st" or "cr")) + end +end +__approach_callback_mode = 2 +if event.approach and not event.has_entered then + atc_set_lzb_tsr(2) + atc_set_ars_disable(true) + return +end + +if event.train then + if not F.has_rc("TANH_REV") then + atc_set_ars_disable(false) + return + end + if not F.has_rc("TANH_REV_active") then + if not atc_arrow then + atc_send("S2") + return + end + if F.has_rc("TANH_REV_exit") then return end + F.add_rc("TANH_REV_active") + split_off_locomotive("B0",3) + atc_send("S2") + set_dir(true) + return + else + if not atc_arrow then return end + F.remove_rc({"TANH_REV_active"}) + F.add_rc("TANH_REV_exit") + atc_send("B0WRD1S5D5SM") + return + end +end
\ No newline at end of file |