1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-23 00:20:17 +01:00

The previous tests were a success, now to do the same thing for glomie's

protection mod.
This commit is contained in:
Vanessa Ezekowitz 2012-10-10 22:58:05 -04:00
parent a7a2e11b7e
commit 340cc7dfb1

View File

@ -114,6 +114,12 @@ minetest.register_node("homedecor:door_closet_oak_bottom_left", {
pd = false pd = false
end end
end end
if type(isprotect)=="function" then
pd = isprotect(5, pos, placer:get_player_name())
if not pd then
minetest.chat_send_player( placer:get_player_name(), "Sorry, someone owns that spot." )
end
end
if pd then if pd then
fdir = minetest.dir_to_facedir(placer:get_look_dir()) fdir = minetest.dir_to_facedir(placer:get_look_dir())
if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then
@ -252,6 +258,12 @@ minetest.register_node("homedecor:door_closet_oak_bottom_right", {
pd = false pd = false
end end
end end
if type(isprotect)=="function" then
pd = isprotect(5, pos, placer:get_player_name())
if not pd then
minetest.chat_send_player( placer:get_player_name(), "Sorry, someone owns that spot." )
end
end
if pd then if pd then
fdir = minetest.dir_to_facedir(placer:get_look_dir()) fdir = minetest.dir_to_facedir(placer:get_look_dir())
if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then