summaryrefslogtreecommitdiff
path: root/mesecons_pistons
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_pistons')
-rw-r--r--mesecons_pistons/init.lua10
-rw-r--r--mesecons_pistons/pistons_down.lua10
-rw-r--r--mesecons_pistons/pistons_up.lua10
3 files changed, 6 insertions, 24 deletions
diff --git a/mesecons_pistons/init.lua b/mesecons_pistons/init.lua
index 1bf7034..3e3f75e 100644
--- a/mesecons_pistons/init.lua
+++ b/mesecons_pistons/init.lua
@@ -135,10 +135,7 @@ mesecon:register_on_signal_on(function(pos, node)
--check for column end
if checknode.name == "air"
or checknode.name == "ignore"
- or checknode.name == "default:water_source"
- or checknode.name == "default:water_flowing"
- or checknode.name == "default:lava_source"
- or checknode.name == "default:lava_flowing" then
+ or not(minetest.registered_nodes[checknode.name].liquidtype == "none") then
break
end
@@ -203,10 +200,7 @@ mesecon:register_on_signal_off(function(pos, node)
checknode = minetest.env:get_node(checkpos)
if checknode.name ~= "air"
and checknode.name ~= "ignore"
- and checknode.name ~= "default:water_source"
- and checknode.name ~= "default:water_flowing"
- and checknode.name ~= "default:lava_source"
- and checknode.name ~= "default:lava_flowing"
+ and minetest.registered_nodes[checknode.name].liquidtype == "none"
and not mesecon:is_mvps_stopper(checknode.name) then
minetest.env:set_node(pos, checknode)
minetest.env:remove_node(checkpos)
diff --git a/mesecons_pistons/pistons_down.lua b/mesecons_pistons/pistons_down.lua
index 4d39c7f..e8dada5 100644
--- a/mesecons_pistons/pistons_down.lua
+++ b/mesecons_pistons/pistons_down.lua
@@ -141,10 +141,7 @@ mesecon:register_on_signal_on(function(pos, node)
--check for column end
if checknode.name == "air"
or checknode.name == "ignore"
- or checknode.name == "default:water_source"
- or checknode.name == "default:water_flowing"
- or checknode.name == "default:lava_source"
- or checknode.name == "default:lava_flowing" then
+ or not(minetest.registered_nodes[checknode.name].liquidtype == "none") then
break
end
@@ -209,10 +206,7 @@ mesecon:register_on_signal_off(function(pos, node)
checknode = minetest.env:get_node(checkpos)
if checknode.name ~= "air"
and checknode.name ~= "ignore"
- and checknode.name ~= "default:water_source"
- and checknode.name ~= "default:water_flowing"
- and checknode.name ~= "default:lava_source"
- and checknode.name ~= "default:lava_flowing"
+ and minetest.registered_nodes[checknode.name].liquidtype == "none"
and not mesecon:is_mvps_stopper(checknode.name) then
minetest.env:remove_node(checkpos)
mesecon:updatenode(checkpos)
diff --git a/mesecons_pistons/pistons_up.lua b/mesecons_pistons/pistons_up.lua
index b3f3261..9002068 100644
--- a/mesecons_pistons/pistons_up.lua
+++ b/mesecons_pistons/pistons_up.lua
@@ -129,10 +129,7 @@ mesecon:register_on_signal_on(function(pos, node)
--check for column end
if checknode.name == "air"
or checknode.name == "ignore"
- or checknode.name == "default:water_source"
- or checknode.name == "default:water_flowing"
- or checknode.name == "default:lava_source"
- or checknode.name == "default:lava_flowing" then
+ or not(minetest.registered_nodes[checknode.name].liquidtype == "none") then
break
end
@@ -197,10 +194,7 @@ mesecon:register_on_signal_off(function(pos, node)
checknode = minetest.env:get_node(checkpos)
if checknode.name ~= "air"
and checknode.name ~= "ignore"
- and checknode.name ~= "default:water_source"
- and checknode.name ~= "default:water_flowing"
- and checknode.name ~= "default:lava_source"
- and checknode.name ~= "default:lava_flowing"
+ and minetest.registered_nodes[checknode.name].liquidtype == "none"
and not mesecon:is_mvps_stopper(checknode.name) then
minetest.env:remove_node(checkpos)
mesecon:updatenode(checkpos)