From c3e161117823e6031d9c5959639dc5e9341aa338 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Fri, 16 Oct 2015 14:38:20 +0200 Subject: [PATCH] Fixes #11149 - Corrects APC behavior when hacked by malfunctioning AI. - It should now be possible to hack the APC to unlock it even when it is hacked by the AI. Normal IDs still don't work on hacked APCs. - A little side-fix, removal of malfunctioning AI's hack of an APC should now work correctly. --- code/modules/power/apc.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6a3fd1da71c..ba2bf2a7e7c 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -627,6 +627,7 @@ // Malf AI, removes the APC from AI's hacked APCs list. if(hacker && hacker.hacked_apcs && src in hacker.hacked_apcs) hacker.hacked_apcs -= src + hacker = null if (opened==2) opened = 1 update_icon() @@ -862,7 +863,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))