TNT: make tnt:burning a falling node.
authorAuke Kok <sofar@foo-projects.org>
Mon, 18 Apr 2016 03:52:45 +0000 (20:52 -0700)
committerparamat <mat.gregory@virginmedia.com>
Tue, 26 Apr 2016 21:34:00 +0000 (22:34 +0100)
This allows TNT to be used for e.g. traps (drop it from the
ceiling) or weird tnt effects with other explosions.

mods/tnt/init.lua

index 1c92c5e4ffae97fa8f44be96c71128d1af7dcf44..6e51feb69b8a540bd0d5fe97b7563af5a531404f 100644 (file)
@@ -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,
@@ -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