diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 7e08b41ef68..bb05921889a 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -12,6 +12,7 @@ braintype = "Robot" lawupdate = 0 density = 1 + req_access = list(access_engine, access_robotics) // We need to keep track of a few module items so we don't need to do list operations // every time we need them. These get set in New() after the module is chosen. @@ -198,11 +199,15 @@ if(stat == 2) - user << "\red You swipe your ID card through [src], attempting to reboot it." if(!config.allow_drone_spawn || emagged || health < -35) //It's dead, Dave. user << "\red The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one." return + if(!allowed(usr)) + user << "\red Access denied." + return + + user << "\red You swipe your ID card through [src], attempting to reboot it." var/drones = 0 for(var/mob/living/silicon/robot/drone/D in world) if(D.key && D.client) @@ -220,6 +225,8 @@ if(allowed(usr)) shut_down() + else + user << "\red Access denied." return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 34920f8d17c..9277f33e16f 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1050,9 +1050,9 @@ if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access return 0 for(var/req in req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - return 1 + if(req in I.access) //have one of the required accesses + return 1 + return 0 /mob/living/silicon/robot/proc/updateicon()