diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:57 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:57 +0200 |
commit | 51dea8f7eed0ed6ba89d3e41663d0e45c300e3c3 (patch) | |
tree | 6c163b0c2ab1096563913353a33c2324339cd15e /durt/nodes | |
parent | 70ea83f5682355ee68115a92cb0b45d6d17a097e (diff) | |
download | luaatc_envs-51dea8f7eed0ed6ba89d3e41663d0e45c300e3c3.tar.gz luaatc_envs-51dea8f7eed0ed6ba89d3e41663d0e45c300e3c3.tar.bz2 luaatc_envs-51dea8f7eed0ed6ba89d3e41663d0e45c300e3c3.zip |
State at 2022-07-09
Diffstat (limited to 'durt/nodes')
-rw-r--r-- | durt/nodes/(1905,0,9143).lua | 5 | ||||
-rw-r--r-- | durt/nodes/(1906,7,9136).lua | 23 |
2 files changed, 25 insertions, 3 deletions
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 |