From a3c95401b9081bb86e09fa96407bb5a09952c6c2 Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 20 Jan 2025 00:00:02 +0100 Subject: State at 2025-01-20 --- durt/nodes/(-4896,13,-6820).lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 durt/nodes/(-4896,13,-6820).lua (limited to 'durt/nodes/(-4896,13,-6820).lua') diff --git a/durt/nodes/(-4896,13,-6820).lua b/durt/nodes/(-4896,13,-6820).lua new file mode 100644 index 0000000..103c52f --- /dev/null +++ b/durt/nodes/(-4896,13,-6820).lua @@ -0,0 +1,28 @@ +-- KKD Runaround +local rejoin_rc = "KKD_REJOIN" +local runaround_cmd = { + "KKD_RUNAROUND", --HS_Down access, runaround + "KKD_HS_U", -- HS_Up access + "KKD_HS_U_CPL", -- recouple in Down Direction + rejoin_rc -- Down 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: Kokardine\nService Terminates Here") + 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("Kokardine\nService Terminates Here") + 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 -- cgit v1.2.3