summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2020-04-15 15:07:56 -0500
committercheapie <no-email-for-you@example.com>2020-04-15 15:07:56 -0500
commitc4027b8be0db78a533d87348d5dca782a45041d7 (patch)
treefdc3cab8ac7c1ba06f21604bcf26ad8d5003a9bb
parent75cac91beab7a3ff04b64fb6ed2b56551ed6171d (diff)
downloadareasprotector-c4027b8be0db78a533d87348d5dca782a45041d7.tar
areasprotector-c4027b8be0db78a533d87348d5dca782a45041d7.tar.gz
areasprotector-c4027b8be0db78a533d87348d5dca782a45041d7.tar.bz2
areasprotector-c4027b8be0db78a533d87348d5dca782a45041d7.tar.xz
areasprotector-c4027b8be0db78a533d87348d5dca782a45041d7.zip
Fix a few bugs related to placing/digging protectors
-rw-r--r--init.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index 48c4b12..5fc2692 100644
--- a/init.lua
+++ b/init.lua
@@ -75,8 +75,6 @@ local function after_dig(pos, oldnode, oldmetadata, digger, sizeword)
areas:remove(id)
areas:save()
end
- else
- inv:remove_item("main", "areasprotector:protector_"..sizeword.." 1")
end
else
areas:remove(id)
@@ -144,7 +142,7 @@ minetest.register_node("areasprotector:protector_large", {
drawtype = "nodebox",
node_box = nbox,
on_place = function(itemstack, player, pointed_thing)
- on_place(itemstack, player, pointed_thing, radius_large, height_large, "large")
+ return on_place(itemstack, player, pointed_thing, radius_large, height_large, "large")
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
after_dig(pos, oldnode, oldmetadata, digger, "large")
@@ -166,7 +164,7 @@ minetest.register_node("areasprotector:protector_small", {
drawtype = "nodebox",
node_box = nbox,
on_place = function(itemstack, player, pointed_thing)
- on_place(itemstack, player, pointed_thing, radius_small, height_small, "small")
+ return on_place(itemstack, player, pointed_thing, radius_small, height_small, "small")
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
after_dig(pos, oldnode, oldmetadata, digger, "small")