From dd6211096696292e9db5341251feaefcdccf16b3 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Mon, 8 Apr 2019 11:12:07 +1000 Subject: [PATCH 1/2] Fixes borgs not being unlockable with PDA holding ID --- code/modules/mob/living/silicon/robot/robot.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 85f66eca2a..4614d4d492 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -714,17 +714,18 @@ return 1 return 0 -/mob/living/silicon/robot/proc/check_access(obj/item/weapon/card/id/I) +/mob/living/silicon/robot/proc/check_access(obj/item/I) if(!istype(req_access, /list)) //something's very wrong return 1 var/list/L = req_access if(!L.len) //no requirements return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access + if(!I || !(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))) //not ID or PDA return 0 + var/access_found = I.GetAccess() for(var/req in req_access) - if(req in I.access) //have one of the required accesses + if(req in access_found) //have one of the required accesses return 1 return 0 From 75c96eec21c8df3cea766cb988243bbad2550554 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Wed, 10 Apr 2019 08:02:23 +1000 Subject: [PATCH 2/2] Allows usage of any proper ID holder --- code/modules/mob/living/silicon/robot/robot.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4614d4d492..76bc2254e8 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -621,7 +621,7 @@ else to_chat(user, "Unable to locate a radio.") - else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)||istype(W, /obj/item/weapon/card/robot)) // trying to unlock the interface with an ID card + else if (W.GetID()) // trying to unlock the interface with an ID card if(emagged)//still allow them to open the cover to_chat(user, "The interface seems slightly damaged") if(opened) @@ -721,7 +721,7 @@ var/list/L = req_access if(!L.len) //no requirements return 1 - if(!I || !(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))) //not ID or PDA + if(!I) //nothing to check with..? return 0 var/access_found = I.GetAccess() for(var/req in req_access)