summaryrefslogtreecommitdiff
path: root/durt/nodes/(-3597,18,-3926).lua
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2025-01-20 00:00:02 +0100
committerautocommitter <autocommitter@linux-forks.de>2025-01-20 00:00:02 +0100
commita3c95401b9081bb86e09fa96407bb5a09952c6c2 (patch)
tree051ecfe11551f8f455807d4ca2e17a2193be8525 /durt/nodes/(-3597,18,-3926).lua
parent0d20b500624044368cade4514087b8fb7a564bc9 (diff)
downloadluaatc_envs-a3c95401b9081bb86e09fa96407bb5a09952c6c2.tar.gz
luaatc_envs-a3c95401b9081bb86e09fa96407bb5a09952c6c2.tar.bz2
luaatc_envs-a3c95401b9081bb86e09fa96407bb5a09952c6c2.zip
State at 2025-01-20
Diffstat (limited to 'durt/nodes/(-3597,18,-3926).lua')
-rw-r--r--durt/nodes/(-3597,18,-3926).lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/durt/nodes/(-3597,18,-3926).lua b/durt/nodes/(-3597,18,-3926).lua
new file mode 100644
index 0000000..badf4a5
--- /dev/null
+++ b/durt/nodes/(-3597,18,-3926).lua
@@ -0,0 +1,28 @@
+-- DJNC Runaround
+local rejoin_rc = "DJNC_REJOIN"
+local runaround_cmd = {
+ "DJNC_RUNAROUND", --HS_Up access, runaround
+ "DJNC_HS_D", -- HS_Down access
+ "DJNC_HS_D_CPL", -- recouple in Up Direction
+ rejoin_rc -- Up rejoin director
+}
+__approach_callback_mode = 1
+if event.approach and not event.has_entered then
+ if not F.has_rc("SFHB") then return end
+ atc_set_text_inside("Next Station: Desert Junction\nService Terminates Here\nChange Here For Noob Express")
+ atc_set_lzb_tsr(1)
+ return
+end
+if event.train then
+ if not get_line() == "SFHB" then return end
+ if not F.has_rc(rejoin_rc) then --train has arrived. Split and run around
+ atc_set_text_inside("Desert Junction\nService Terminates Here\nChange Here For Noob Express")
+ split_off_locomotive("A0S0OL")
+ F.add_rc(runaround_cmd)
+ return
+ end
+ F.remove_rc(runaround_cmd)
+ atc_send("OCS0WRD5SM")
+ atc_set_text_inside("")
+ return
+end \ No newline at end of file