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:
e134282
)
Add protection support to doors
author
ShadowNinja
<noreply@gmail.com>
Wed, 12 Feb 2014 23:05:16 +0000
(18:05 -0500)
committer
ShadowNinja
<noreply@gmail.com>
Wed, 12 Feb 2014 23:26:43 +0000
(18:26 -0500)
mods/doors/init.lua
patch
|
blob
|
history
diff --git
a/mods/doors/init.lua
b/mods/doors/init.lua
index 46ab539b748561cc729219c17325e8c4430be8b3..0df84aa57caa37e7ceb40e38f5cae7de354a4d40 100644
(file)
--- a/
mods/doors/init.lua
+++ b/
mods/doors/init.lua
@@
-59,6
+59,12
@@
function doors:register_door(name, def)
then
return itemstack
end
+
+ if minetest.is_protected(pt, placer:get_player_name()) or
+ minetest.is_protected(pt2, placer:get_player_name()) then
+ minetest.record_protection_violation(pt, placer:get_player_name())
+ return itemstack
+ end
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
local pt3 = {x=pt.x, y=pt.y, z=pt.z}