Skip to content

Commit

Permalink
Fix particlespawner removal when digging fancy fire
Browse files Browse the repository at this point in the history
  • Loading branch information
luk3yx committed Oct 26, 2023
1 parent 951f774 commit 52f7c54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fake_fire/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,16 @@ local function start_fire_effects(pos, node, clicker, chimney)
minsize = 4, maxsize = 8,
texture = "smoke_particle.png",
})
this_spawner_meta:set_int("smoky", id)
if chimney == 1 then
this_spawner_meta:set_int("smoky", id)
this_spawner_meta:set_int("sound", 0)
else
s_handle = minetest.sound_play("fire_small", {
pos = pos,
max_hear_distance = 5,
loop = true
})
fire_particles_off(pos)
fire_particles_on(pos)
this_spawner_meta:set_int("sound", s_handle)
end
Expand Down Expand Up @@ -161,6 +162,7 @@ minetest.register_node("fake_fire:ice_fire", {
end,
on_destruct = function (pos)
stop_smoke(pos)
fire_particles_off(pos)
minetest.sound_play("fire_extinguish", {
pos = pos, max_hear_distance = 5
})
Expand Down Expand Up @@ -199,6 +201,7 @@ minetest.register_node("fake_fire:fancy_fire", {
"fake_fire_empty_tile.png"
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
fire_particles_off(pos)
fire_particles_on(pos)
return itemstack
end,
Expand Down Expand Up @@ -353,4 +356,3 @@ minetest.register_lbm({
end
end
})

0 comments on commit 52f7c54

Please sign in to comment.