diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6a3fd1da71c..7f232d80412 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -479,8 +479,6 @@ user << "There is nothing to secure." return update_icon() - else if(emagged) - user << "The interface is broken." else wiresexposed = !wiresexposed user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]" @@ -625,8 +623,9 @@ qdel(W) stat &= ~BROKEN // Malf AI, removes the APC from AI's hacked APCs list. - if(hacker && hacker.hacked_apcs && src in hacker.hacked_apcs) + if(hacker && hacker.hacked_apcs && (src in hacker.hacked_apcs)) hacker.hacked_apcs -= src + hacker = null if (opened==2) opened = 1 update_icon() @@ -749,7 +748,7 @@ return var/list/data = list( - "locked" = locked, + "locked" = (locked && !emagged) ? 1 : 0, "isOperating" = operating, "externalPower" = main_status, "powerCellStatus" = cell ? cell.percent() : null, @@ -862,7 +861,7 @@ user << "\The [src] have AI control disabled!" return 0 else - if ((!in_range(src, user) || !istype(src.loc, /turf) || hacker)) // AI-hacked APCs cannot be controlled by other AIs, unlinked cyborgs or humans. + if (!in_range(src, user) || !istype(src.loc, /turf)) return 0 var/mob/living/carbon/human/H = user if (istype(H)) @@ -881,7 +880,7 @@ if(!can_use(usr, 1)) return 1 - if(!istype(usr, /mob/living/silicon) && locked) + if(!istype(usr, /mob/living/silicon) && (locked && !emagged)) // Shouldn't happen, this is here to prevent href exploits usr << "You must unlock the panel to use this!" return 1