From 5a45d2b609e22156b30d8e2dd8b7bd54e1a693fe Mon Sep 17 00:00:00 2001 From: Zeg9 Date: Thu, 6 Jun 2013 13:45:29 +0200 Subject: [PATCH] Only remove fences and signs from inventory if expected --- signs_lib.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/signs_lib.lua b/signs_lib.lua index bd900b4..f530960 100644 --- a/signs_lib.lua +++ b/signs_lib.lua @@ -180,7 +180,10 @@ minetest.register_node(":default:sign_wall", { z = above.z + sign_info.delta.z}, "signs:text") text:setyaw(sign_info.yaw) - itemstack:take_item() + + if not homedecor_expect_infinite_stacks then + itemstack:take_item() + end return itemstack end end, @@ -429,13 +432,17 @@ function homedecor_register_fence_with_sign(fencename, fencewithsignname) elseif (not homedecor_node_is_owned(pointed_thing.under, placer)) and def_under.buildable_to then minetest.env:add_node(pointed_thing.under, {name = fencename, param2 = fdir}) - itemstack:take_item() + if not homedecor_expect_infinite_stacks then + itemstack:take_item() + end placer:set_wielded_item(itemstack) return itemstack elseif (not homedecor_node_is_owned(pointed_thing.above, placer)) and def_above.buildable_to then minetest.env:add_node(pointed_thing.above, {name = fencename, param2 = fdir}) - itemstack:take_item() + if not homedecor_expect_infinite_stacks then + itemstack:take_item() + end placer:set_wielded_item(itemstack) return itemstack end