Only check attachment for nodes with group attached_node
authorPilzAdam <adam-k@outlook.com>
Sat, 1 Dec 2012 14:20:53 +0000 (15:20 +0100)
committerPilzAdam <adam-k@outlook.com>
Sat, 1 Dec 2012 14:20:53 +0000 (15:20 +0100)
builtin/item.lua

index 9352a43fcf8f24025e6906a37d3edf1831ca6265..4be77e1d758171aa85a56088e259339eb4eb6549 100644 (file)
@@ -182,7 +182,8 @@ function minetest.item_place_node(itemstack, placer, pointed_thing)
        end
 
        -- Check if the node is attached and if it can be placed there
-       if not check_attached_node(place_to, newnode) then
+       if minetest.get_item_group(def.name, "attached_node") ~= 0 and
+               not check_attached_node(place_to, newnode) then
                minetest.log("action", "attached node " .. def.name ..
                        " can not be placed at " .. minetest.pos_to_string(place_to))
                return