We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 682d79b commit 7a892c7Copy full SHA for 7a892c7
mods/tnt/init.lua
@@ -299,7 +299,6 @@ end
299
function tnt.boom(pos, def)
300
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64})
301
minetest.set_node(pos, {name = "tnt:boom"})
302
- minetest.get_node_timer(pos):start(0.5)
303
local drops = tnt_explode(pos, def.radius, def.ignore_protection,
304
def.ignore_on_blast)
305
entity_physics(pos, def.damage_radius)
@@ -316,6 +315,9 @@ minetest.register_node("tnt:boom", {
316
315
walkable = false,
317
drop = "",
318
groups = {dig_immediate = 3},
+ on_construct = function(pos)
319
+ minetest.get_node_timer(pos):start(0.5)
320
+ end,
321
on_timer = function(pos, elapsed)
322
minetest.remove_node(pos)
323
end,
0 commit comments