forked from mtcontrib/homedecor_modpack
another test
This commit is contained in:
parent
ead549405e
commit
8d9537628f
|
@ -70,14 +70,13 @@ minetest.register_node("homedecor:door_wood_plain_bottom_left", {
|
||||||
fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16 }
|
fixed = { -0.5, -0.5, 6/16, 0.5, 0.5, 8/16 }
|
||||||
},
|
},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
local pos = pointed_thing.above
|
||||||
if type(IsPlayerNodeOwner)=="function" then
|
if type(IsPlayerNodeOwner)=="function" then
|
||||||
if not IsPlayerNodeOwner(pos, user:get_player_name()) then
|
if not IsPlayerNodeOwner(pos, user:get_player_name()) then
|
||||||
minetest.chat_send_player( placer:get_player_name(), "Sorry, "..getLastOwner(pos).." owns that spot." )
|
minetest.chat_send_player( placer:get_player_name(), "Sorry, "..getLastOwner(pos).." owns that spot." )
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||||
local pos = pointed_thing.above
|
|
||||||
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
|
||||||
minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place a door!' )
|
minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place a door!' )
|
||||||
return
|
return
|
||||||
|
@ -171,13 +170,13 @@ minetest.register_node("homedecor:door_wood_plain_bottom_right", {
|
||||||
},
|
},
|
||||||
drop = "homedecor:door_wood_plain_bottom_left",
|
drop = "homedecor:door_wood_plain_bottom_left",
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
local pos = pointed_thing.above
|
||||||
if type(IsPlayerNodeOwner)=="function" then
|
if type(IsPlayerNodeOwner)=="function" then
|
||||||
if not IsPlayerNodeOwner(pos, user:get_player_name()) then
|
if not IsPlayerNodeOwner(pos, user:get_player_name()) then
|
||||||
minetest.chat_send_player( placer:get_player_name(), "Sorry, "..getLastOwner(pos).." owns that spot." )
|
minetest.chat_send_player( placer:get_player_name(), "Sorry, "..getLastOwner(pos).." owns that spot." )
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||||
local pos = pointed_thing.above
|
|
||||||
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
|
||||||
minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place a door!' )
|
minetest.chat_send_player( placer:get_player_name(), 'Not enough vertical space to place a door!' )
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user