Add protection support to doors
This commit is contained in:
parent
e134282093
commit
3e2781bc00
@ -60,6 +60,12 @@ function doors:register_door(name, def)
|
|||||||
return itemstack
|
return itemstack
|
||||||
end
|
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 p2 = minetest.dir_to_facedir(placer:get_look_dir())
|
||||||
local pt3 = {x=pt.x, y=pt.y, z=pt.z}
|
local pt3 = {x=pt.x, y=pt.y, z=pt.z}
|
||||||
if p2 == 0 then
|
if p2 == 0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user