mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
sl4v & Nicu: Don't open chests if there is a full block above them, for 1-node normal & trapped chests
This commit is contained in:
parent
a511152cdf
commit
3cd30a559e
1 changed files with 4 additions and 0 deletions
|
@ -227,6 +227,10 @@ minetest.register_node("mcl_chests:"..basename, {
|
|||
_mcl_hardness = 2.5,
|
||||
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
if minetest.registered_nodes[minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name].groups.opaque == 1 then
|
||||
-- won't open if there is no space from the top
|
||||
return false
|
||||
end
|
||||
local name = minetest.get_meta(pos):get_string("name")
|
||||
if name == "" then
|
||||
name = S("Chest")
|
||||
|
|
Loading…
Reference in a new issue