summaryrefslogtreecommitdiff
path: root/water.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-12-10 15:25:28 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2016-12-10 15:25:28 +0000
commit5d7ec17e63bb34eb9717fb2146be39301b0af523 (patch)
treef93b005f748ea30cc6726d3c7a2fc1f18b128930 /water.lua
parent31f2fd185e999aa017f17986edc4611294a7cf02 (diff)
tweak torch water drop
Diffstat (limited to 'water.lua')
-rw-r--r--water.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/water.lua b/water.lua
index 60c4dbf..48eb525 100644
--- a/water.lua
+++ b/water.lua
@@ -127,7 +127,7 @@ if ethereal.torchdrop == true then
minetest.register_abm({
label = "Ethereal drop torch",
- nodenames = {"default:torch", "group:torch"}, -- group:torch for new 3d torches
+ nodenames = {"default:torch", "default:torch_wall", "default:torch_ceiling"},
neighbors = {"group:water"},
interval = 5,
chance = 1,
@@ -138,20 +138,21 @@ minetest.register_abm({
{x = pos.x - 1, y = pos.y, z = pos.z},
{x = pos.x + 1, y = pos.y, z = pos.z},
{"group:water"})
-
+if num == 0 then
num = num + #minetest.find_nodes_in_area(
{x = pos.x, y = pos.y, z = pos.z - 1},
{x = pos.x, y = pos.y, z = pos.z + 1},
{"group:water"})
-
+end
+if num == 0 then
num = num + #minetest.find_nodes_in_area(
{x = pos.x, y = pos.y + 1, z = pos.z},
{x = pos.x, y = pos.y + 1, z = pos.z},
{"group:water"})
-
+end
if num > 0 then
- minetest.swap_node(pos, {name = "air"})
+ minetest.set_node(pos, {name = "air"})
minetest.add_item(pos, {name = "default:torch"})
end