From 4c38ff4289bd71a17a3ddee31f54fde63b0b3510 Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 22 Apr 2024 14:57:02 +0200 Subject: State at 2022-04-26 --- durt/nodes/(-3524,8,-2281).lua | 6 ++++-- durt/nodes/(-3543,8,-2281).lua | 12 +++++++++++- durt/nodes/(-3546,8,-2277).lua | 9 +++++++++ durt/nodes/(-3556,8,-2277).lua | 9 +++++++++ durt/nodes/(-3590,8,-2277).lua | 7 ++++++- durt/nodes/(-3604,8,-2281).lua | 5 +++++ 6 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 durt/nodes/(-3546,8,-2277).lua create mode 100644 durt/nodes/(-3556,8,-2277).lua diff --git a/durt/nodes/(-3524,8,-2281).lua b/durt/nodes/(-3524,8,-2281).lua index 9afccd1..53a5cf5 100644 --- a/durt/nodes/(-3524,8,-2281).lua +++ b/durt/nodes/(-3524,8,-2281).lua @@ -1,6 +1,8 @@ local dir = "east" + +local headshunt_rc = "Treefarm_headshunt_"..dir if event.train and atc_arrow then - if F.get_rc_safe():match("Treefarm_headshunt_"..dir) then + if F.has_rc(headshunt_rc) then schedule_in(";01",atc_id) return end @@ -11,7 +13,7 @@ if event.schedule then schedule_in(";01",event.msg) return else - atc_send_to_train(event.msg,"S0WRS3CplA0S1D2S0WRA1S3") + atc_send_to_train(event.msg,"S0WRS3") return end end \ No newline at end of file diff --git a/durt/nodes/(-3543,8,-2281).lua b/durt/nodes/(-3543,8,-2281).lua index 7489acc..d8bef79 100644 --- a/durt/nodes/(-3543,8,-2281).lua +++ b/durt/nodes/(-3543,8,-2281).lua @@ -1 +1,11 @@ --- \ No newline at end of file +if event.ext_int then + if not atc_id then + print("No Train to send") + return + end + F.add_rc({"Treefarm_headshunt_east","Treefarm_loading"}) + split_off_locomotive("A0B0") + atc_send("A1S4") + set_autocouple() + return +end \ No newline at end of file diff --git a/durt/nodes/(-3546,8,-2277).lua b/durt/nodes/(-3546,8,-2277).lua new file mode 100644 index 0000000..3d1c930 --- /dev/null +++ b/durt/nodes/(-3546,8,-2277).lua @@ -0,0 +1,9 @@ +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + atc_lzb_set_tsr(1) +end + +if event.train and atc_arrow then + atc_send("S1") +end \ No newline at end of file diff --git a/durt/nodes/(-3556,8,-2277).lua b/durt/nodes/(-3556,8,-2277).lua new file mode 100644 index 0000000..3d1c930 --- /dev/null +++ b/durt/nodes/(-3556,8,-2277).lua @@ -0,0 +1,9 @@ +__approach_callback_mode = 1 + +if event.approach and not event.has_entered then + atc_lzb_set_tsr(1) +end + +if event.train and atc_arrow then + atc_send("S1") +end \ No newline at end of file diff --git a/durt/nodes/(-3590,8,-2277).lua b/durt/nodes/(-3590,8,-2277).lua index 7489acc..7c97d9e 100644 --- a/durt/nodes/(-3590,8,-2277).lua +++ b/durt/nodes/(-3590,8,-2277).lua @@ -1 +1,6 @@ --- \ No newline at end of file +if event.train and atc_arrow then + F.remove_rc({"Treefarm_headshunt_east","Treefarm_loading"}) + F.add_rc({"Treefarm_exit_west","TY_RTS"}) + atc_send("S4D10SM") + unset_autocouple() +end \ No newline at end of file diff --git a/durt/nodes/(-3604,8,-2281).lua b/durt/nodes/(-3604,8,-2281).lua index 59bd29d..2fb3175 100644 --- a/durt/nodes/(-3604,8,-2281).lua +++ b/durt/nodes/(-3604,8,-2281).lua @@ -1,5 +1,10 @@ local dir = "west" if event.train and atc_arrow then + if F.has_rc("Treefarm_exit_west") then + F.remove_rc({"Treefarm_exit_west"}) + return + end + local rc = get_rc() or "" if rc:match("Treefarm_headshunt_"..dir) then schedule_in(";01",atc_id) -- cgit v1.2.3