From 51dea8f7eed0ed6ba89d3e41663d0e45c300e3c3 Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 22 Apr 2024 14:57:57 +0200 Subject: State at 2022-07-09 --- durt/nodes/(1905,0,9143).lua | 5 +++++ durt/nodes/(1906,7,9136).lua | 23 ++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 durt/nodes/(1905,0,9143).lua (limited to 'durt/nodes') diff --git a/durt/nodes/(1905,0,9143).lua b/durt/nodes/(1905,0,9143).lua new file mode 100644 index 0000000..500f0a0 --- /dev/null +++ b/durt/nodes/(1905,0,9143).lua @@ -0,0 +1,5 @@ +if event.punch then + S.yards.WOA.mine_count = 1 + print("WOA Mine: reset counter") + digiline_send("train_ctl","send") +end \ No newline at end of file diff --git a/durt/nodes/(1906,7,9136).lua b/durt/nodes/(1906,7,9136).lua index df38109..03ae1a0 100644 --- a/durt/nodes/(1906,7,9136).lua +++ b/durt/nodes/(1906,7,9136).lua @@ -16,12 +16,21 @@ if event.approach and not event.has_entered then end if event.train and atc_arrow then + digiline_send("mine_counter_lcd",S.yards.WOA.mine_counter) if F.has_rc("WOA_mine_around") then if F.has_rc("WOA_around_active") then F.remove_rc(around_rc_list) unset_autocouple() - atc_send("B0WRD3SMA1") - atc_set_text_outside("Warmonaye Mining Co.") + if S.yards.WOA.mine_count < 7 then -- send train back to yard + S.yards.WOA.mine_count = S.yards.WOA.mine_count + 1 + print("WOA Mine Count: "..S.yards.WOA.mine_count) + atc_set_text_outside("Warmoneaye Mining Co.") + atc_send("B0WRD3SMA1") + else + S.yards.WOA.mine_count = 0 + atc_send("B0") + atc_set_text_outside("Warmoneaye Mining Co.\nAwaiting More Overburden") + end return end atc_set_text_outside("Warmoneaye Mining Co.\nLocomotive Switching Ends") @@ -32,4 +41,12 @@ if event.train and atc_arrow then atc_send("S4A1") return end -end \ No newline at end of file +end + +if event.digiline and atc_id then + if not F.has_rc("WOA_around_active") then + atc_set_text_outside("Warmoneaye Mining Co.") + atc_send("S0WRD3SMA1") + return + end +end -- cgit v1.2.3