mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 08:29:34 +01:00
Don't allow banner placement on ceiling
This commit is contained in:
parent
8d0c8965d7
commit
4284d3397d
1 changed files with 6 additions and 0 deletions
|
@ -221,8 +221,14 @@ for colorid, colortab in pairs(mcl_banners.colors) do
|
||||||
|
|
||||||
-- Place the node!
|
-- Place the node!
|
||||||
local hanging = false
|
local hanging = false
|
||||||
|
|
||||||
|
-- Standing or hanging banner. The placement rules are enforced by the node definitions
|
||||||
local _, success = minetest.item_place_node(ItemStack("mcl_banners:standing_banner"), placer, pointed_thing)
|
local _, success = minetest.item_place_node(ItemStack("mcl_banners:standing_banner"), placer, pointed_thing)
|
||||||
if not success then
|
if not success then
|
||||||
|
-- Forbidden on ceiling
|
||||||
|
if pointed_thing.under.y ~= pointed_thing.above.y then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
_, success = minetest.item_place_node(ItemStack("mcl_banners:hanging_banner"), placer, pointed_thing)
|
_, success = minetest.item_place_node(ItemStack("mcl_banners:hanging_banner"), placer, pointed_thing)
|
||||||
if not success then
|
if not success then
|
||||||
return itemstack
|
return itemstack
|
||||||
|
|
Loading…
Reference in a new issue