small change

This commit is contained in:
HybridDog 2015-09-19 09:40:14 +02:00
parent f14c6888d3
commit 973aa03180

View File

@ -43,10 +43,9 @@ local function get_pointed_info(pointed_thing, name)
end end
local pu = minetest.get_pointed_thing_position(pointed_thing) local pu = minetest.get_pointed_thing_position(pointed_thing)
local pa = minetest.get_pointed_thing_position(pointed_thing, true) local pa = minetest.get_pointed_thing_position(pointed_thing, true)
if not (pu and pa) then if not pu
return or not pa
end or pu.y ~= pa.y then
if pu.y ~= pa.y then
return return
end end
local nd_u = minetest.get_node(pu) local nd_u = minetest.get_node(pu)
@ -93,11 +92,11 @@ for name,_ in pairs(chests) do
return return
end end
local pu, pa, par2 = get_pointed_info(pointed_thing, name) local pu, pa, par2 = get_pointed_info(pointed_thing, name)
if not (pu and placer:get_player_control().sneak) then if not pu
or not placer:get_player_control().sneak then
return place_chest(itemstack, placer, pointed_thing) return place_chest(itemstack, placer, pointed_thing)
end end
local protected = minetest.is_protected(pa, placer:get_player_name()) if minetest.is_protected(pa, placer:get_player_name()) then
if protected then
return return
end end
connect_chests(pu, pa, par2, name) connect_chests(pu, pa, par2, name)