mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-03-21 15:21:21 +00:00
Add protection support to doors
This commit is contained in:
parent
e134282093
commit
3e2781bc00
1 changed files with 6 additions and 0 deletions
|
@ -59,6 +59,12 @@ function doors:register_door(name, def)
|
||||||
then
|
then
|
||||||
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}
|
||||||
|
|
Loading…
Add table
Reference in a new issue