Merge pull request #38 from Thomas--S/trowel-protection

Trowel: Add protection support
This commit is contained in:
Joachim Stolberg 2020-10-23 15:56:58 +02:00 committed by GitHub
commit e9ba040733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,6 +67,10 @@ end
local function replace_node(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then
local pos = pointed_thing.under
local name = placer:get_player_name()
if minetest.is_protected(pos, name) then
return
end
local meta = M(pos)
local node = minetest.get_node(pos)
if minetest.get_item_group(node.name, "techage_trowel") == 1 then