summaryrefslogtreecommitdiff
path: root/Tyard/nodes/(-4100,12,-2745).lua
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:56:58 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:56:58 +0200
commitaeea70df13db7d77ce2ce1075cbd14dc1c3797fc (patch)
tree0b95d7adcbc6f128ce1528d6e965c926bb725fb1 /Tyard/nodes/(-4100,12,-2745).lua
parent4062f8447ce4eaa550613c41d3251c473522c201 (diff)
downloadluaatc_envs-aeea70df13db7d77ce2ce1075cbd14dc1c3797fc.tar.gz
luaatc_envs-aeea70df13db7d77ce2ce1075cbd14dc1c3797fc.tar.bz2
luaatc_envs-aeea70df13db7d77ce2ce1075cbd14dc1c3797fc.zip
State at 2022-04-19
Diffstat (limited to 'Tyard/nodes/(-4100,12,-2745).lua')
-rw-r--r--Tyard/nodes/(-4100,12,-2745).lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/Tyard/nodes/(-4100,12,-2745).lua b/Tyard/nodes/(-4100,12,-2745).lua
new file mode 100644
index 0000000..16007e9
--- /dev/null
+++ b/Tyard/nodes/(-4100,12,-2745).lua
@@ -0,0 +1,33 @@
+-- Yard arrival checker
+local function enter_yard()
+ F.dir(true)
+ F.yard_active(true)
+ atc_set_ars_disable(false)
+ atc_send("S6")
+ return
+end
+
+__approach_callback_mode = 1
+if event.approach and not event.has_entered then
+ atc_set_ars_disable(true)
+ atc_set_lzb_trs(1)
+ return
+end
+
+if event.train then
+ if F.yard_active() then
+ schedule_in(";10","recheck")
+ return
+ else
+ enter_yard()
+ end
+end
+
+if event.schedule then
+ if F.yard_active() then
+ schedule_in(";10","recheck")
+ return
+ else
+ enter_yard()
+ end
+end \ No newline at end of file