1
0
mirror of https://github.com/Sokomine/replacer.git synced 2024-11-15 06:10:21 +01:00

added support for new minetest.is_protected

This commit is contained in:
Sokomine 2013-11-20 21:50:38 +01:00
parent 8a940cff91
commit d0c891d83d
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,12 @@
-- taken from Vanessa Ezekowitz' homedecor mod
-- see http://forum.minetest.net/viewtopic.php?pid=26061 or https://github.com/VanessaE/homedecor for details!
function replacer_homedecor_node_is_owned(pos, placer)
if type( minetest.is_protected == "function") then
return minetest.is_protected( pos, placer:get_player_name() );
end
local ownername = false
if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
if HasOwner(pos, placer) then -- returns true if the node is owned

View File

@ -21,6 +21,8 @@
-- Version 2.0
-- Changelog:
-- 20.11.2013 * if the server version is new enough, minetest.is_protected is used
-- in order to check if the replacement is allowed
-- 24.04.2013 * param1 and param2 are now stored
-- * hold sneak + right click to store new pattern
-- * right click: place one of the itmes