summaryrefslogtreecommitdiff
path: root/mesecons
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-08-13 22:42:45 +0200
committerJeija <norrepli@gmail.com>2012-08-13 22:42:45 +0200
commitc58882b0c60135e02fcf2c6b5adac1f1e9aa22e6 (patch)
treefcf111b85a25261e50202eaf8ee3170674650629 /mesecons
parent9f16e4fcaaf683e8e97ef9baea6153c5168f5346 (diff)
downloadmesecons-c58882b0c60135e02fcf2c6b5adac1f1e9aa22e6.tar
mesecons-c58882b0c60135e02fcf2c6b5adac1f1e9aa22e6.tar.gz
mesecons-c58882b0c60135e02fcf2c6b5adac1f1e9aa22e6.tar.bz2
mesecons-c58882b0c60135e02fcf2c6b5adac1f1e9aa22e6.tar.xz
mesecons-c58882b0c60135e02fcf2c6b5adac1f1e9aa22e6.zip
Bugfix: Check if receptor node is powered from somewhere before turning it off in mesecons:turnoff
Diffstat (limited to 'mesecons')
-rw-r--r--mesecons/internal.lua2
1 files changed, 1 insertions, 1 deletions
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