From c58882b0c60135e02fcf2c6b5adac1f1e9aa22e6 Mon Sep 17 00:00:00 2001 From: Jeija Date: Mon, 13 Aug 2012 22:42:45 +0200 Subject: [PATCH] Bugfix: Check if receptor node is powered from somewhere before turning it off in mesecons:turnoff --- mesecons/internal.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesecons/internal.lua b/mesecons/internal.lua index bba29b8..ccc7844 100644 --- a/mesecons/internal.lua +++ b/mesecons/internal.lua @@ -307,7 +307,7 @@ function mesecon:turnoff(pos, sourcepos) if mesecon:is_effector(node.name) then if mesecon:effector_inputs(sourcepos, pos) then mesecon:changesignal(pos) - if mesecon:is_effector_on(node.name) then mesecon:deactivate(pos) end + if mesecon:is_effector_on(node.name) and not mesecon:is_powered(pos) then mesecon:deactivate(pos) end end end end