From 7b572e4ca74c650cc72333c7a43420fca7677953 Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Fri, 17 Aug 2012 05:48:16 +0000 Subject: [PATCH] - Fixes issue 760 The AI's machine variable did not get reset properly upon failure. The machine variable's interact() proc is normally called once per tick. In the case of an APC it printed the fail message, but did not reset the variable to null, meaning the same machine's interact() proc would get called the next tick, giving the same error. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4463 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/power/apc.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 28c2f039389..0f2cf22b3d2 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -446,7 +446,7 @@ // if (!can_use(user)) This already gets called in interact() and in topic() // return src.add_fingerprint(user) - if(opened && (!istype(user, /mob/living/silicon))) + if(opened && (!issilicon(user))) if(cell) usr.put_in_hands(cell) cell.add_fingerprint(user) @@ -527,11 +527,13 @@ return else if (istype(user, /mob/living/silicon) && src.aidisabled && !src.malfhack) user << "AI control for this APC interface has been disabled." + user.machine = null user << browse(null, "window=apc") return else if (src.malfai) if ((src.malfai != user && src.malfai != user:parent) && !islinked(user, malfai)) user << "AI control for this APC interface has been disabled." + user.machine = null user << browse(null, "window=apc") return