This commit is contained in:
pinkysnowman 2015-10-20 06:51:29 +00:00
commit cf5ffca77d
2 changed files with 37 additions and 0 deletions

View file

@ -345,3 +345,40 @@ minetest.register_abm({
end
})
--
-- Water mist
--
minetest.register_abm({
nodenames = {"default:water_flowing"},
neighbors = {"default:water_source"},
interval = 5,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local posa = {x=pos.x, y=pos.y+1, z=pos.z}
local posu = {x=pos.x, y=pos.y-1, z=pos.z}
local na = minetest.get_node(posa).name
local nu = minetest.get_node(posu).name
if na == "default:water_flowing" then
if nu == "default:water_source" then
minetest.add_particlespawner({
amount = 100,
time = 6,
minpos = {x=pos.x-0.5,y=pos.y,z=pos.z-0.5},
maxpos = {x=pos.x+0.5,y=pos.y+0.3,z=pos.z+0.5},
minvel = {x=-0.6, y=0.3, z=-0.6},
maxvel = {x=0.6, y=0.6, z=0.6},
minacc = {x=0, y=-0.1, z=0},
maxacc = {x=-0.3, y=-0.3, z=-0.3},
minexptime = 2,
maxexptime = 2,
minsize = 5,
maxsize = 9,
collisiondetection = true,
vertical = false,
texture = "default_water_mist.png",
})
end
end
end
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B