From ccf6868cc3b8eaaee917c3c1a0592016efab7d0b Mon Sep 17 00:00:00 2001 From: AntumDeluge Date: Thu, 4 May 2017 15:03:59 -0700 Subject: [PATCH] [mp_minetest] Upgrade 'tnt' mod to Git commit be91212: Hopefully fixes some issues --- mods/mp_minetest/tnt/init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mods/mp_minetest/tnt/init.lua b/mods/mp_minetest/tnt/init.lua index 9870f891..e5ad5b16 100644 --- a/mods/mp_minetest/tnt/init.lua +++ b/mods/mp_minetest/tnt/init.lua @@ -260,13 +260,15 @@ end function tnt.burn(pos, nodename) local name = nodename or minetest.get_node(pos).name - local group = minetest.get_item_group(name, "tnt") - if group > 0 then + local def = minetest.registered_nodes[name] + if not def then + return + elseif def.on_ignite then + def.on_ignite(pos) + elseif minetest.get_item_group(name, "tnt") > 0 then minetest.sound_play("tnt_ignite", {pos = pos}) minetest.set_node(pos, {name = name .. "_burning"}) minetest.get_node_timer(pos):start(1) - elseif name == "tnt:gunpowder" then - minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) end end