diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:58:03 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:58:03 +0200 |
commit | 7b3ac07f3f9b9d92582aceb74050215a36646bc5 (patch) | |
tree | 3eda9d8e0a85b9d0daa53dd2887d154d9e0ef172 /auto_yards/nodes/(-594,26,2485).lua | |
parent | efa99edcbd392873d8ed78eae7760f8c0b23dc45 (diff) | |
download | luaatc_envs-7b3ac07f3f9b9d92582aceb74050215a36646bc5.tar.gz luaatc_envs-7b3ac07f3f9b9d92582aceb74050215a36646bc5.tar.bz2 luaatc_envs-7b3ac07f3f9b9d92582aceb74050215a36646bc5.zip |
State at 2023-03-26
Diffstat (limited to 'auto_yards/nodes/(-594,26,2485).lua')
-rw-r--r-- | auto_yards/nodes/(-594,26,2485).lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/auto_yards/nodes/(-594,26,2485).lua b/auto_yards/nodes/(-594,26,2485).lua new file mode 100644 index 0000000..270750f --- /dev/null +++ b/auto_yards/nodes/(-594,26,2485).lua @@ -0,0 +1,28 @@ +local yard_id = "CAN" + +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. +]]-- + + ['ARC'] = {['pos'] = POS(-630,26,2454), ['msg'] = "notify"}, --send the CAN loco to collect from ARC, then return and deliver here for ARC + ['CORN'] = {['pos'] = POS(-630,26,2454), ['msg'] = "shuffle"} -- consolidate wagons to the departure track + ['BOTTLES'] = {['pos'] = POS(-630,26,2454), ['msg'] = "shuffle"} -- consolidate wagons to the departure track + ['ETHANOL'] = {['pos'] = POS(-630,26,2454), ['msg'] = "shuffle"} -- consolidate wagons to the departure track +} + +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 |