1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Add support for attached facedir/4dir nodes (#11432)

This commit is contained in:
Wuzzy 2022-11-24 23:56:07 +01:00 committed by GitHub
parent 1c10988d6a
commit 3c7f26d937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 177 additions and 27 deletions

View file

@ -240,8 +240,9 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
end
-- Check if the node is attached and if it can be placed there
if core.get_item_group(def.name, "attached_node") ~= 0 and
not builtin_shared.check_attached_node(place_to, newnode) then
local an = core.get_item_group(def.name, "attached_node")
if an ~= 0 and
not builtin_shared.check_attached_node(place_to, newnode, an) then
log("action", "attached node " .. def.name ..
" cannot be placed at " .. core.pos_to_string(place_to))
return itemstack, nil