aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/item.lua
diff options
context:
space:
mode:
authorWuzzy <Wuzzy@disroot.org>2022-11-24 23:56:07 +0100
committerGitHub <noreply@github.com>2022-11-24 17:56:07 -0500
commit3c7f26d93721d8d86ca5d9e894e8652b1e2a8672 (patch)
tree7f5713d792f48edc51332c90798f17647624c98a /builtin/game/item.lua
parent1c10988d6a19b06ac9c64e83675a76dea29cad2e (diff)
downloadminetest-3c7f26d93721d8d86ca5d9e894e8652b1e2a8672.tar.xz
Add support for attached facedir/4dir nodes (#11432)
Diffstat (limited to 'builtin/game/item.lua')
-rw-r--r--builtin/game/item.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/game/item.lua b/builtin/game/item.lua
index 1d1d52860..71126b0a7 100644
--- a/builtin/game/item.lua
+++ b/builtin/game/item.lua
@@ -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