From 36d18cb16163405234f92d17897b66d12487476a Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 9 Feb 2016 21:34:03 +0000 Subject: [PATCH] added timer to tnt:tnt_burning for explosions By adding the timer to the tnt:tnt_burning node it will help mods add the block and cause an explosion after 4 seconds instead of doing nothing like in it's current state. --- mods/tnt/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 4e033c6..981cc9e 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -234,7 +234,6 @@ minetest.register_node("tnt:tnt", { if puncher:get_wielded_item():get_name() == "default:torch" then minetest.sound_play("tnt_ignite", {pos=pos}) minetest.set_node(pos, {name="tnt:tnt_burning"}) - minetest.get_node_timer(pos):start(4) end end, on_blast = function(pos, intensity) @@ -258,6 +257,9 @@ minetest.register_node("tnt:tnt_burning", { light_source = 5, drop = "", sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + minetest.get_node_timer(pos):start(4) + end, on_timer = boom, -- unaffected by explosions on_blast = function() end,