Merge pull request #8 from NathanSalapat/dev
lava spawns particles now, the particles may still need some tweaking.master
commit
0430efb196
17
abms.lua
17
abms.lua
|
@ -127,8 +127,7 @@ minetest.register_abm({ --smoke for embers
|
|||
interval = 1,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
if minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z}).name == 'air'
|
||||
and minetest.get_node({x=pos.x, y=pos.y+2.0, z=pos.z}).name == 'air' then
|
||||
if minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z}).name == 'air' then
|
||||
smoke_particles(pos)
|
||||
end
|
||||
end
|
||||
|
@ -139,9 +138,19 @@ minetest.register_abm({ --embers for fire
|
|||
interval = 1,
|
||||
chance = 2,
|
||||
action = function(pos, node)
|
||||
if minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z}).name == 'air'
|
||||
and minetest.get_node({x=pos.x, y=pos.y+2.0, z=pos.z}).name == 'air' then
|
||||
if minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z}).name == 'air' then
|
||||
ember_particles(pos)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({ --lava
|
||||
nodenames = {'default:lava_source', 'default:lava_flowing'},
|
||||
interval = 4,
|
||||
chance = 15,
|
||||
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
|
||||
})
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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-.5, z=pos.z},
|
||||
maxpos = {x=pos.x, y=pos.y, z=pos.z},
|
||||
minvel = {x=-.4, y=1, z=-.4},
|
||||
maxvel = {x=.4, y=1.5, z=.4},
|
||||
minacc = {x=-.4, y=1, z=-.4},
|
||||
maxacc = {x=.4, y=1.5, z=.4},
|
||||
minexptime = 1,
|
||||
maxexptime = 1.5,
|
||||
minsize = .6,
|
||||
maxsize = 2,
|
||||
collisiondetection = false,
|
||||
texture = 'more_fire_lava_blob.png',
|
||||
vertical = false,
|
||||
-- playername = 'singleplayer',
|
||||
})
|
||||
end
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 638 B |
Loading…
Reference in New Issue