tweak torch water drop

master
TenPlus1 2016-12-10 15:25:28 +00:00
parent 31f2fd185e
commit 5d7ec17e63
2 changed files with 7 additions and 6 deletions

View File

@ -206,7 +206,7 @@ minetest.register_tool("ethereal:shovel_crystal", {
itemstack:add_wear(65535 / 100) -- 111 uses
end
minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.35})
minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.4})
return itemstack
end

View File

@ -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