--leekston collection controller local up_dir = "North" local down_dir = "South" local up_dir_indicator = POS(771,13,-14) local down_dir_indicator = POS(771,13,-15) local exit_indicator_pos = POS(771,13,-18) local userlist = { "Maverick2797", "mary4" } if event.ext_int then --to be pinged by the departing LHF train only local dir if F.indicator(exit_indicator_pos) then F.indicator(up_dir_indicator, false) dir = up_dir else F.indicator(down_dir_indicator, false) dir = down_dir end digiline_send("lcd",string.format("%s | Train collected and departed %sbound",rwt.to_string(rwt.now()), dir)) return end --confirm user is actually allowed to use this system local permitted_user = false for _,name in pairs(userlist) do if name == event.name then permitted_user = name break end end if not permitted_user then digiline_send("lcd","User is not permitted to use this. Contact a moderator") return end local dir = "" --cycle through the departure options if F.indicator(up_dir_indicator) then F.indicator(up_dir_indicator, false) F.indicator(down_dir_indicator, true) dir = down_dir.."bound" elseif F.indicator(down_dir_indicator) then F.indicator(up_dir_indicator, false) F.indicator(down_dir_indicator, false) dir = "Disabled" else F.indicator(up_dir_indicator, true) F.indicator(down_dir_indicator, false) dir = up_dir.."bound" end digiline_send("lcd",string.format("%s\nCollection %s.\nUser %s", rwt.to_string(rwt.now()), dir, event.name))