Basic flame effect for bonfire
This commit is contained in:
parent
d31496907f
commit
52b5ea67a2
@ -1,4 +1,24 @@
|
||||
bonfire = {}
|
||||
local null = {x=0, y=0, z=0}
|
||||
|
||||
local function add_fire(pos)
|
||||
pos.y = pos.y-0.2
|
||||
minetest.add_particle(pos, null, null, 4,
|
||||
6, true, "bonfire_fire"..tostring(math.random(1,2)) ..".png")
|
||||
pos.y = pos.y-0.2
|
||||
minetest.add_particle(pos, null, null, 4,
|
||||
6, true, "bonfire_fire"..tostring(math.random(1,2)) ..".png")
|
||||
end
|
||||
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"bonfire:self_active"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
add_fire(pos)
|
||||
end
|
||||
})
|
||||
|
||||
bonfire.formspec =
|
||||
"size[8,9]"..
|
||||
|
BIN
mods/bonfire/textures/bonfire_fire1.png
Normal file
BIN
mods/bonfire/textures/bonfire_fire1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 818 B |
BIN
mods/bonfire/textures/bonfire_fire2.png
Normal file
BIN
mods/bonfire/textures/bonfire_fire2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 759 B |
BIN
mods/farming/textures/farming_anthill.png
Normal file
BIN
mods/farming/textures/farming_anthill.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 656 B |
Loading…
x
Reference in New Issue
Block a user