Skip to content

Commit

Permalink
TNT: make tnt:burning a falling node.
Browse files Browse the repository at this point in the history
This allows TNT to be used for e.g. traps (drop it from the
ceiling) or weird tnt effects with other explosions.
  • Loading branch information
sofar authored and paramat committed Apr 26, 2016
1 parent 8b384fb commit 682d79b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mods/tnt/init.lua
Expand Up @@ -502,6 +502,7 @@ function tnt.register_tnt(def)
light_source = 5,
drop = "",
sounds = default.node_sound_wood_defaults(),
groups = {falling_node = 1},
on_timer = function(pos, elapsed)
tnt.boom(pos, def)
end,
Expand All @@ -510,6 +511,7 @@ function tnt.register_tnt(def)
on_construct = function(pos)
minetest.sound_play("tnt_ignite", {pos = pos})
minetest.get_node_timer(pos):start(4)
nodeupdate(pos)
end,
})
end
Expand Down

0 comments on commit 682d79b

Please sign in to comment.