summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auto_yards/init_code.lua3
-rw-r--r--auto_yards/nodes/(-2004,2,-1101).lua1
-rw-r--r--auto_yards/nodes/(-2004,3,-1099).lua3
-rw-r--r--auto_yards/nodes/(1178,16,3851).lua13
-rw-r--r--auto_yards/nodes/(1179,16,3849).lua9
-rw-r--r--durt/nodes/(-1512,8,-2613).lua2
-rw-r--r--durt/nodes/(1949,7,9112).lua4
7 files changed, 30 insertions, 5 deletions
diff --git a/auto_yards/init_code.lua b/auto_yards/init_code.lua
index 4a66f6e..f0a62da 100644
--- a/auto_yards/init_code.lua
+++ b/auto_yards/init_code.lua
@@ -33,6 +33,8 @@ if event.init then
dir_indicator_pos = POS(1177,16,3855),
error_indicator_pos = POS(1179,16,3850),
headshunt_max = 5,
+ notify = {},
+ notify_pos = POS(1178,16,3851)
},
-- HY = {
@@ -365,6 +367,7 @@ F.headshunt_exit = function(yard_id,this_dir) -- arrow points out of yard
F.remove_rc_match(yard_id.."_WAGONS_%d+")
if yard.notify_pos then
+ print(yard.notify)
interrupt_pos(yard.notify_pos,"notify")
print("init notifications")
else
diff --git a/auto_yards/nodes/(-2004,2,-1101).lua b/auto_yards/nodes/(-2004,2,-1101).lua
index 6ff3fbf..b686f37 100644
--- a/auto_yards/nodes/(-2004,2,-1101).lua
+++ b/auto_yards/nodes/(-2004,2,-1101).lua
@@ -1,7 +1,6 @@
local yard_id = "BY"
local subs = {
['S27'] = POS(-1512,8,-2613),
- ['no_match_anywhere'] = POS(-2006,3,-1099),
}
if event.ext_int or event.punch then
diff --git a/auto_yards/nodes/(-2004,3,-1099).lua b/auto_yards/nodes/(-2004,3,-1099).lua
index 69ad077..8f4b247 100644
--- a/auto_yards/nodes/(-2004,3,-1099).lua
+++ b/auto_yards/nodes/(-2004,3,-1099).lua
@@ -1,6 +1,7 @@
local s = rwt.to_string(rwt.now()).."\n--"
+local list = S.yards.BY.notify
for k in pairs(S.yards.BY.notify) do
s = s ..k..", "
end
s = s.."--"
-digiline_send("",s) \ No newline at end of file
+digiline_send("notification_screen",s) \ No newline at end of file
diff --git a/auto_yards/nodes/(1178,16,3851).lua b/auto_yards/nodes/(1178,16,3851).lua
new file mode 100644
index 0000000..35047d5
--- /dev/null
+++ b/auto_yards/nodes/(1178,16,3851).lua
@@ -0,0 +1,13 @@
+local yard_id = "IP"
+local subs = {
+ ['WOA_mine_empty'] = POS(1949,7,9112),
+}
+
+if event.ext_int or event.punch then
+ for fc, pos in pairs(subs) do
+ if S.yards[yard_id].notify[fc] then
+ interrupt_pos(pos,"notify")
+ end
+ end
+ S.yards[yard_id].notify = {}
+end
diff --git a/auto_yards/nodes/(1179,16,3849).lua b/auto_yards/nodes/(1179,16,3849).lua
new file mode 100644
index 0000000..68e2a0f
--- /dev/null
+++ b/auto_yards/nodes/(1179,16,3849).lua
@@ -0,0 +1,9 @@
+local yard_id = "IP"
+if event.punch then
+ local notifications = "-- Notify --\n"
+ local ref = S.yards[yard_id].notify
+ for fc in pairs(ref) do
+ notifications = notifications..fc.." \n"
+ end
+ digiline_send("notify_lcd",notifications)
+end
diff --git a/durt/nodes/(-1512,8,-2613).lua b/durt/nodes/(-1512,8,-2613).lua
index 9651843..6732baf 100644
--- a/durt/nodes/(-1512,8,-2613).lua
+++ b/durt/nodes/(-1512,8,-2613).lua
@@ -2,7 +2,7 @@ local ind = POS(-1513,8,-2613)
local loco_track = POS(-1515,7,-2625)
if event.ext_int then
- if event.message == "S27" then
+ if event.message == "notify" then
if F.indicator(ind) then return end
F.indicator(ind,true)
interrupt_pos(loco_track,"SEND")
diff --git a/durt/nodes/(1949,7,9112).lua b/durt/nodes/(1949,7,9112).lua
index 06aee8c..8fd61c9 100644
--- a/durt/nodes/(1949,7,9112).lua
+++ b/durt/nodes/(1949,7,9112).lua
@@ -13,8 +13,8 @@ if event.train and atc_arrow then
atc_send("B0WR")
end
-if (event.channel == "train_ctl" and event.msg == "send") or ((event.ext_int or event.schedule) and event.message == "send") then
- print("RX Notification")
+if (event.ext_int and event.message == "notify") or (event.schedule and event.message == "send") or (event.channel=="train_ctl" and event.msg=="send") then
+ print("WOA RX Notification")
if not atc_id then
F.indicator(ind,true)
return