projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c993e14
)
Add protection to TNT (by @tenplus1)
author
BlockMen
<nmuelll@web.de>
Sun, 13 Jul 2014 17:20:20 +0000
(19:20 +0200)
committer
BlockMen
<nmuelll@web.de>
Sun, 13 Jul 2014 17:24:57 +0000
(19:24 +0200)
mods/tnt/init.lua
patch
|
blob
|
history
diff --git
a/mods/tnt/init.lua
b/mods/tnt/init.lua
index 4da0713d17c59b7d2cbf831fd7d0d0189c081ece..2f2dbbe39c6e158e42f2beeae25b5fa072bc7f60 100644
(file)
--- 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))