mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Fixes #5118
Also fixes robot/access() so that it will accept any one of the accesses in req_access, instead of all - a much more likely use case.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user