summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-02-03 02:11:16 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-06-18 12:42:20 -0400
commitfd0366cfd99e097994f1201518c05439e8ddac6c (patch)
tree0940c3e63b6b496754b26fcb36da698d56fb199b
parent64069ebd388320e7c90520f731a07cc543521fdc (diff)
make pressure sensor turn off if it doesn't have at least one
side connected to a source of pressure
-rw-r--r--flowing_logic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/flowing_logic.lua b/flowing_logic.lua
index e4eee8a..dce7bc4 100644
--- a/flowing_logic.lua
+++ b/flowing_logic.lua
@@ -270,7 +270,7 @@ minetest.register_abm({
local sensor = string.match(node.name, "pipeworks:flow_sensor_")
local newnode = nil
- if my_level > 1 then
+ if my_level > 1 and (set1 or set2) then
newnode = sensor.."loaded"
else
newnode = sensor.."empty"