lava particles are here.

master
NathanSalapat 2015-06-04 10:03:21 -05:00
parent bd2f730e4e
commit 7160c96300
3 changed files with 35 additions and 0 deletions

View File

@ -145,3 +145,14 @@ minetest.register_abm({ --embers for fire
end
end
})
minetest.register_abm({ --lava
nodenames = {'default:lava_source', 'default:lava_flowing'},
interval = 3,
chance = 7,
action = function(pos, node)
if minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z}).name == 'air' then
lava_particles(pos)
end
end
})

View File

@ -1,3 +1,6 @@
6-3-15:
Campfires and embers now have particles, smoke for the embers, and little sparks for the fires. Also lava now spawns little lava particles, the particles do nothing other than add a little visual effect.
5-30-15:
Napiophelios put together some nice smoke bombs and molotov cocktails for this mod, I(Nathan) did a few tweaks, changed some alignment and took care of some depreciated functions to stop debug spamming.

View File

@ -83,3 +83,24 @@ function ember_particles(pos)
-- playername = 'singleplayer',
})
end
function lava_particles(pos)
minetest.add_particlespawner({
amount = 2,
time = 1,
minpos = {x=pos.x, y=pos.y, z=pos.z},
maxpos = {x=pos.x, y=pos.y, z=pos.z},
minvel = {x=-.4, y=.2, z=-.4},
maxvel = {x=.6, y=1, z=.6},
minacc = {x=-.3, y=.2, z=-.3},
maxacc = {x=.3, y=.6, z=.3},
minexptime = 1,
maxexptime = 2,
minsize = .4,
maxsize = 2,
collisiondetection = false,
texture = 'default_lava.png',
vertical = false,
-- playername = 'singleplayer',
})
end