diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:58:25 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:58:25 +0200 |
commit | 72b5cc792208fcc6fcfd103b909ce69bdef12c8b (patch) | |
tree | db6c6848f1a402a9a7d83f15ac2803a780f2d1e7 /auto_yards/nodes | |
parent | fe5294d1d13441071f6cb58c2594062875b4439d (diff) | |
download | luaatc_envs-72b5cc792208fcc6fcfd103b909ce69bdef12c8b.tar.gz luaatc_envs-72b5cc792208fcc6fcfd103b909ce69bdef12c8b.tar.bz2 luaatc_envs-72b5cc792208fcc6fcfd103b909ce69bdef12c8b.zip |
State at 2023-04-11
Diffstat (limited to 'auto_yards/nodes')
-rw-r--r-- | auto_yards/nodes/(-1946,16,840).lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/auto_yards/nodes/(-1946,16,840).lua b/auto_yards/nodes/(-1946,16,840).lua new file mode 100644 index 0000000..def9136 --- /dev/null +++ b/auto_yards/nodes/(-1946,16,840).lua @@ -0,0 +1,27 @@ +local yard_id = "ARC" + +if not S.yards[yard_id].notify then return end + +local subs = { +--[[ + 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. +]]-- + + ['S27'] = {['pos'] = POS(-1515,7,-2625), ['msg'] = "notify"}, + ['ARC_SB'] = {['pos'] = POS(-1973,16,800), ['msg'] = "notify"}, + ['CANNERY'] = {['pos'] = POS(-630,26,2454), ['msg'] = "notify"}, +} + +if event.ext_int or event.punch then + local list = "Notify: " + for fc, sub in pairs(subs) do + if S.yards[yard_id].notify[fc] then + interrupt_pos(sub.pos,sub.msg or "notify") + list = list .. fc .. ", " + end + end + digiline_send("lcd",list) + S.yards[yard_id].notify = {} +end
\ No newline at end of file |