From 7b3ac07f3f9b9d92582aceb74050215a36646bc5 Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 22 Apr 2024 14:58:03 +0200 Subject: State at 2023-03-26 --- durt/nodes/(-1515,7,-2625).lua | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'durt/nodes/(-1515,7,-2625).lua') diff --git a/durt/nodes/(-1515,7,-2625).lua b/durt/nodes/(-1515,7,-2625).lua index c12db21..2fd2155 100644 --- a/durt/nodes/(-1515,7,-2625).lua +++ b/durt/nodes/(-1515,7,-2625).lua @@ -1,17 +1,29 @@ +local notification_id = "S27" local ind = POS(-1513,8,-2613) +local print_notification = true local function send_train() - set_rc("FREIGHT S23 TanhX_NBS23toE3 BYARD BY_COLLECT_S27 MGGRatHYARD S27 S27_UNLOAD S27_Overburden BY_RTS S27_EXIT") + set_rc("FREIGHT S23 ARCAUTO ARC_RTS ARC_COLLECT_S27 ARC_AUTO_S23S TanhX_SBS23toE3 MGGRatHYARD S27 S27_UNLOAD S27_Overburden S27_EXIT") atc_send("S0WRD2A1S4") - set_route(POS(-1504,8,-2622),"Through to Lead") F.indicator(ind,false) end -if event.ext_int and atc_id then - send_train() +if event.ext_int then + if event.message == "notify" then + if print_notification then print(rwt.to_string(rwt.now()) .. " "..notification_id.." RX Notification") end + if F.indicator(ind) then return end + if atc_id then + send_train() + return + else + F.indicator(ind,true) + return + end + end end - if event.train then if F.indicator(ind) then send_train() + return end + atc_send("B0") return end \ No newline at end of file -- cgit v1.2.3