BotKeeper (tablet app) list populates based on bot unlock access (#54730)

Anyone can now download BotKeeper. Only bots your current ID can unlock will be listed to control. Stylised Botkeeper as BotKeeper because it looks better.
This commit is contained in:
cacogen
2020-11-07 19:03:56 +13:00
committed by GitHub
parent cba42d4ea3
commit 13564fb51b
@@ -1,10 +1,10 @@
/datum/computer_file/program/robocontrol
filename = "botkeeper"
filedesc = "Botkeeper"
filedesc = "BotKeeper"
program_icon_state = "robot"
extended_desc = "A remote controller used for giving basic commands to non-sentient robots."
transfer_access = ACCESS_ROBOTICS
transfer_access = null
requires_ntnet = TRUE
size = 12
tgui_id = "NtosRoboControl"
@@ -37,7 +37,13 @@
for(var/B in GLOB.bots_list)
var/mob/living/simple_animal/bot/Bot = B
if(!Bot.on || Bot.z != zlevel || Bot.remote_disabled) //Only non-emagged bots on the same Z-level are detected!
continue //Also, the PDA must have access to the bot type.
continue
else if(computer) //Also, the inserted ID must have access to the bot type
var/obj/item/card/id/id_card = card_slot ? card_slot.stored_card : null
if(!id_card && !Bot.bot_core.allowed(current_user))
continue
else if(id_card && !Bot.bot_core.check_access(id_card))
continue
var/list/newbot = list("name" = Bot.name, "mode" = Bot.get_mode_ui(), "model" = Bot.model, "locat" = get_area(Bot), "bot_ref" = REF(Bot), "mule_check" = FALSE)
if(Bot.bot_type == MULE_BOT)
var/mob/living/simple_animal/bot/mulebot/MULE = Bot