summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-01-06 20:40:59 -0500
committerShadowNinja <shadowninja@minetest.net>2014-01-06 21:25:10 -0500
commit9551f651cb93b9b3f3cfcee61031c14f472253ce (patch)
tree78385116fa7dd5c29318b3a63713af62ab64e16f /builtin
parent811ea6cfc0c7b120c757eecf5b8907a2c142477e (diff)
downloadminetest-9551f651cb93b9b3f3cfcee61031c14f472253ce.tar.gz
minetest-9551f651cb93b9b3f3cfcee61031c14f472253ce.tar.bz2
minetest-9551f651cb93b9b3f3cfcee61031c14f472253ce.zip
Add protection support to auto-rotated nodes
Diffstat (limited to 'builtin')
-rw-r--r--builtin/misc_helpers.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/misc_helpers.lua b/builtin/misc_helpers.lua
index 623476915..8b2d493b7 100644
--- a/builtin/misc_helpers.lua
+++ b/builtin/misc_helpers.lua
@@ -302,6 +302,12 @@ if minetest then
iswall = false
end
+ if minetest.is_protected(pos, placer:get_player_name()) then
+ minetest.record_protection_violation(pos,
+ placer:get_player_name())
+ return
+ end
+
local ndef = minetest.registered_nodes[node.name]
if not ndef or not ndef.buildable_to then
return