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:
08eec2b
)
doors: record protection violation if it cannot be dug
author
upsilon
<upsilon@langg.net>
Sat, 25 Mar 2017 16:18:17 +0000
(17:18 +0100)
committer
paramat
<mat.gregory@virginmedia.com>
Sun, 26 Mar 2017 02:06:44 +0000
(
03:06
+0100)
mods/doors/init.lua
patch
|
blob
|
history
diff --git
a/mods/doors/init.lua
b/mods/doors/init.lua
index 2b3d094aa723ba3dd21bafc8a436d990b95b0db5..974e9d3d5dce9ca9e398bcf184d0cb739af5f5c4 100644
(file)
--- a/
mods/doors/init.lua
+++ b/
mods/doors/init.lua
@@
-203,7
+203,12
@@
end
local function can_dig_door(pos, digger)
replace_old_owner_information(pos)
- return default.can_interact_with_node(digger, pos)
+ if default.can_interact_with_node(digger, pos) then
+ return true
+ else
+ minetest.record_protection_violation(pos, digger:get_player_name())
+ return false
+ end
end
function doors.register(name, def)