- 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
This commit is contained in:
baloh.matevz
2012-08-17 05:48:16 +00:00
parent adbc74a942
commit 7b572e4ca7
+3 -1
View File
@@ -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