From 13564fb51bc38ea65de163144d25713968792c3e Mon Sep 17 00:00:00 2001 From: cacogen <25089914+cacogen@users.noreply.github.com> Date: Sat, 7 Nov 2020 19:03:56 +1300 Subject: [PATCH] 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. --- .../file_system/programs/robocontrol.dm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/modules/modular_computers/file_system/programs/robocontrol.dm b/code/modules/modular_computers/file_system/programs/robocontrol.dm index 4b97c19445c..8c41ea6c380 100644 --- a/code/modules/modular_computers/file_system/programs/robocontrol.dm +++ b/code/modules/modular_computers/file_system/programs/robocontrol.dm @@ -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