From cd8bc1d8786f39279aaeb54fab071d8d2874586c Mon Sep 17 00:00:00 2001 From: ESwordTheCat Date: Sun, 20 Apr 2014 10:07:13 +0800 Subject: [PATCH] Let depend on use_power var if we need to know the area. --- code/game/machinery/machinery.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index d7327f87ec7..507b656ed1a 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -119,11 +119,15 @@ Class Procs: return ..() /obj/machinery/proc/addAtProcessing() - myArea = loc.loc + if (use_power) + myArea = loc.loc + machines += src /obj/machinery/proc/removeAtProcessing() - myArea = null + if (myArea) + myArea = null + machines -= src /obj/machinery/Destroy()