diff options
Diffstat (limited to 'auto_yards')
-rw-r--r-- | auto_yards/init_code.lua | 3 | ||||
-rw-r--r-- | auto_yards/nodes/(-2004,2,-1101).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-2004,3,-1099).lua | 3 | ||||
-rw-r--r-- | auto_yards/nodes/(1178,16,3851).lua | 13 | ||||
-rw-r--r-- | auto_yards/nodes/(1179,16,3849).lua | 9 |
5 files changed, 27 insertions, 2 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 |