summaryrefslogtreecommitdiff
path: root/mesecons_pistons
diff options
context:
space:
mode:
authorAnthony <azhang9@gmail.com>2012-08-30 09:43:56 -0700
committerAnthony <azhang9@gmail.com>2012-08-30 09:43:56 -0700
commit5cc18d8fbd4b09e8c6075ead262e98fd8a663b35 (patch)
tree12c9e2ae746e601fb19df6786d770605b9478f4b /mesecons_pistons
parentbcd6634811d311b2e64307ccd866f20c0b60e23f (diff)
parentb7553145b088f595d3af187a0515a70aaaadc46b (diff)
downloadmesecons-5cc18d8fbd4b09e8c6075ead262e98fd8a663b35.tar
mesecons-5cc18d8fbd4b09e8c6075ead262e98fd8a663b35.tar.gz
mesecons-5cc18d8fbd4b09e8c6075ead262e98fd8a663b35.tar.bz2
mesecons-5cc18d8fbd4b09e8c6075ead262e98fd8a663b35.tar.xz
mesecons-5cc18d8fbd4b09e8c6075ead262e98fd8a663b35.zip
Merge pull request #42 from Jat15/master
Modified pistons, movestone, mvps for all liquid
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)