1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-23 07:10:19 +01:00

Add protection to TNT (by @tenplus1)

This commit is contained in:
BlockMen 2014-07-13 19:20:20 +02:00
parent c993e14084
commit 3180bdfe6c

View File

@ -37,7 +37,11 @@ local add_drop = function(drops, pos, item)
end end
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 local nodename = minetest.get_node(pos).name
if nodename ~= "air" then if nodename ~= "air" then
minetest.remove_node(pos, (fast and 1 or 0)) minetest.remove_node(pos, (fast and 1 or 0))