Fix another crash.

This commit is contained in:
Signal 2025-12-01 19:07:49 -05:00
parent c54579e426
commit a7ed39131c
3 changed files with 8 additions and 4 deletions

View file

@ -64,6 +64,9 @@ minetest.register_entity(":artifact:vix_scene", {
end,
on_deactivate = function(e)
vix_scene = nil
if e.particles then
minetest.delete_particlespawner(e.particles)
end
end,
on_step = function(e)
if e._can_check then
@ -110,7 +113,7 @@ local function pre_vix_on_whacked(type, target)
minetest.after(1, function()
artifact.push_chat_message("Hehe.", "Key", "artifact_key_splash_low.png")
end)
elseif num == 5 then -- All generators are down.
elseif num >= 5 then -- All generators are down.
vix_scene._can_check = nil
-- Wait just a bit, so the player can look up.
minetest.after(0.5, function()
@ -263,7 +266,7 @@ artifact.register_node("stasis_beacon", {
paramtype = "light"
})
-- The 'cutscene' playerd after the player frees Vix.
-- The 'cutscene' played after the player frees Vix.
function ns.play_vix_scene()
-- Kaboom.
minetest.add_particle {