From: BlockMen Date: Sun, 13 Jul 2014 17:20:20 +0000 (+0200) Subject: Add protection to TNT (by @tenplus1) X-Git-Tag: 0.4.11~71 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3180bdfe6ce40a6f155329078884e797c310b8f1;p=oweals%2Fminetest_game.git Add protection to TNT (by @tenplus1) --- diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 4da0713d..2f2dbbe3 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -37,7 +37,11 @@ local add_drop = function(drops, pos, item) end end -local destroy = function(drops, pos, last, fast) +local function destroy(drops, pos, last, fast) + if minetest.is_protected(pos, "") then + return + end + local nodename = minetest.get_node(pos).name if nodename ~= "air" then minetest.remove_node(pos, (fast and 1 or 0))