diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:53 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:53 +0200 |
commit | 7ac61207f5e208d1d70871a714218465b3025d16 (patch) | |
tree | 93d95ec02df16419ea5e09b7ec3b1adc1018984e /auto_yards/nodes | |
parent | 8fa52d91d54f9b55272b872434fa2add447a0da2 (diff) | |
download | luaatc_envs-7ac61207f5e208d1d70871a714218465b3025d16.tar.gz luaatc_envs-7ac61207f5e208d1d70871a714218465b3025d16.tar.bz2 luaatc_envs-7ac61207f5e208d1d70871a714218465b3025d16.zip |
State at 2022-07-03
Diffstat (limited to 'auto_yards/nodes')
-rw-r--r-- | auto_yards/nodes/(-2004,2,-1101).lua | 27 | ||||
-rw-r--r-- | auto_yards/nodes/(-2004,3,-1099).lua | 7 | ||||
-rw-r--r-- | auto_yards/nodes/(-2006,3,-1099).lua | 5 |
3 files changed, 15 insertions, 24 deletions
diff --git a/auto_yards/nodes/(-2004,2,-1101).lua b/auto_yards/nodes/(-2004,2,-1101).lua index c39016a..6ff3fbf 100644 --- a/auto_yards/nodes/(-2004,2,-1101).lua +++ b/auto_yards/nodes/(-2004,2,-1101).lua @@ -1,23 +1,14 @@ local yard_id = "BY" local subs = { - ['S27'] = POS(-1512,8,-2613) + ['S27'] = POS(-1512,8,-2613), + ['no_match_anywhere'] = POS(-2006,3,-1099), } -if event.ext_int then - print(event) - local m = event.message - if m.command == "NOTIFY" then -- store the notifications in the yards's S table entry for mass-dispatch - if m.msg == "*" then return end -- no need to notify for the LHF train's collect moves - S.yards[yard_id].notify[m.msg] = true - return - end - if m.command == "COLLECTED" then - S.yards[yard_id].notify[m.msg] = nil - return - end - if m.command == "EXIT" then - for k in pairs(S.yards[yard_id].notify) do - if subs[k] then interrupt_pos(subs[k],{command="NOTIFY",msg=k}) end + +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 - return end -end
\ No newline at end of file + S.yards[yard_id].notify = {} +end diff --git a/auto_yards/nodes/(-2004,3,-1099).lua b/auto_yards/nodes/(-2004,3,-1099).lua index bc283b9..69ad077 100644 --- a/auto_yards/nodes/(-2004,3,-1099).lua +++ b/auto_yards/nodes/(-2004,3,-1099).lua @@ -1,3 +1,6 @@ -local s = rwt.to_string(rwt.now()).."\n--"..table.concat(S.yards.BY.notify,", ").."--" -print(s) +local s = rwt.to_string(rwt.now()).."\n--" +for k in pairs(S.yards.BY.notify) do + s = s ..k..", " +end +s = s.."--" digiline_send("",s)
\ No newline at end of file diff --git a/auto_yards/nodes/(-2006,3,-1099).lua b/auto_yards/nodes/(-2006,3,-1099).lua index f920c5a..d774476 100644 --- a/auto_yards/nodes/(-2006,3,-1099).lua +++ b/auto_yards/nodes/(-2006,3,-1099).lua @@ -1,5 +1,2 @@ if event.digiline then return end -print(event) -print("BY YARD: ") print(S.yards.BY.notify) -print("IP YARD: ") print(S.yards.IP.notify) -print("TY YARD: ") print(S.yards.TY.notify)
\ No newline at end of file +print("Notification Sent")
\ No newline at end of file |