From: Auke Kok Date: Tue, 17 Jan 2017 23:21:13 +0000 (-0800) Subject: TNT: Log explosions and player igniting tnt or gunpowder X-Git-Tag: 0.4.16~103 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1104d571b0cd6aed190c2e53064768175a4b0329;p=oweals%2Fminetest_game.git TNT: Log explosions and player igniting tnt or gunpowder --- diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 711aad94..5d1de604 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -372,6 +372,8 @@ function tnt.boom(pos, def) eject_drops(drops, pos, radius) end add_effects(pos, radius, drops) + minetest.log("action", "A TNT explosion occurred at " .. minetest.pos_to_string(pos) .. + " with radius " .. radius) end minetest.register_node("tnt:boom", { @@ -411,6 +413,9 @@ minetest.register_node("tnt:gunpowder", { on_punch = function(pos, node, puncher) if puncher:get_wielded_item():get_name() == "default:torch" then minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + minetest.log("action", puncher:get_player_name() .. + " ignites tnt:gunpowder at " .. + minetest.pos_to_string(pos)) end end, on_blast = function(pos, intensity) @@ -550,6 +555,9 @@ function tnt.register_tnt(def) on_punch = function(pos, node, puncher) if puncher:get_wielded_item():get_name() == "default:torch" then minetest.set_node(pos, {name = name .. "_burning"}) + minetest.log("action", puncher:get_player_name() .. + " ignites " .. node.name .. " at " .. + minetest.pos_to_string(pos)) end end, on_blast = function(pos, intensity)