mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-23 07:35:16 +02:00
Fix placing signs on buildable_to nodes
This commit is contained in:
parent
bd2317e9ad
commit
77b39e25c9
1 changed files with 8 additions and 5 deletions
|
@ -307,12 +307,15 @@ end)
|
|||
-- Node definition callbacks
|
||||
function sign_tpl.on_place(itemstack, placer, pointed_thing)
|
||||
local under = pointed_thing.under
|
||||
local node = core.get_node(under)
|
||||
local def = core.registered_nodes[node.name]
|
||||
if not def then return itemstack end
|
||||
do
|
||||
local node = core.get_node(under)
|
||||
local def = core.registered_nodes[node.name]
|
||||
if def and def.buildable_to then return itemstack end
|
||||
end
|
||||
|
||||
if mcl_util.call_on_rightclick(itemstack, placer, pointed_thing) then
|
||||
return itemstack
|
||||
local new_stack = mcl_util.call_on_rightclick(itemstack, placer, pointed_thing)
|
||||
if new_stack then
|
||||
return new_stack
|
||||
end
|
||||
|
||||
local above = pointed_thing.above
|
||||
|
|
Loading…
Add table
Reference in a new issue