diff options
author | autocommitter <autocommitter@linux-forks.de> | 2025-05-15 00:00:02 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2025-05-15 00:00:02 +0200 |
commit | 67dfe52759c24369a65786f4151a3334d1aebedb (patch) | |
tree | 5a2e573dd40b511832ba930572bcfc28d2cdf908 /durt/nodes/(-2204,8,-651).lua | |
parent | 2b6aba7bc06572635d426f1fc36f135a1cd76ce4 (diff) | |
download | luaatc_envs-master.tar.gz luaatc_envs-master.tar.bz2 luaatc_envs-master.zip |
Diffstat (limited to 'durt/nodes/(-2204,8,-651).lua')
-rw-r--r-- | durt/nodes/(-2204,8,-651).lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/durt/nodes/(-2204,8,-651).lua b/durt/nodes/(-2204,8,-651).lua new file mode 100644 index 0000000..1607eaf --- /dev/null +++ b/durt/nodes/(-2204,8,-651).lua @@ -0,0 +1,27 @@ +local cmd = { + "TREES_RUNAROUND", + "SHUNT_MAINLINE_REV", +} +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + atc_set_ars_disable(true) + atc_set_lzb_tsr(1) + return +end + +if event.train and atc_arrow then + if not F.has_rc("BYARD_NOID_SHUTTLE") then return end -- not our train, disregard + if not F.has_rc("TREES_RUNAROUND") then -- train has arrived from yard, split and runaround + split_off_locomotive("A0B0") --disable ARS to stop the rest of the train engaging the signal + F.add_rc(cmd) --add RC commands tomake the train runaround + atc_send("S3A1") --send the loco on its way to make the runaround + return + end + --else loco has returned from runaround + F.remove_rc(cmd) -- remove runaround RCs + atc_send("S0WRS1") --reverse the train and creep towards the other departure signal + step_fc() --step the fc forward to be ready for the autoyard + return +end +
\ No newline at end of file |