diff options
Diffstat (limited to 'auto_yards/nodes/(-2004,2,-1101).lua')
-rw-r--r-- | auto_yards/nodes/(-2004,2,-1101).lua | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/auto_yards/nodes/(-2004,2,-1101).lua b/auto_yards/nodes/(-2004,2,-1101).lua index b686f37..c0d57ae 100644 --- a/auto_yards/nodes/(-2004,2,-1101).lua +++ b/auto_yards/nodes/(-2004,2,-1101).lua @@ -1,13 +1,25 @@ local yard_id = "BY" + +if not S.yards[yard_id].notify then return end + local subs = { - ['S27'] = POS(-1512,8,-2613), +--[[ + A list of FC subscribers to send out notifications for. + Each entry must have a coresponding Lua Track / Operators Panel to trigger (using event.ext_int) + Used to alert a shunter locomotive or other yard that there's wagons available to collect from this yard. +]]-- + + ['ARC'] = {['pos'] = POS(-1973,16,800), ['msg'] = "notify"}, } if event.ext_int or event.punch then - for fc, pos in pairs(subs) do + local list = "Notify: " + for fc, sub in pairs(subs) do if S.yards[yard_id].notify[fc] then - interrupt_pos(pos,"notify") + interrupt_pos(sub.pos,sub.msg or "notify") + list = list .. fc .. ", " end end + digiline_send("lcd",list) S.yards[yard_id].notify = {} end |