summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--node_breaker.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/node_breaker.lua b/node_breaker.lua
index 03df35c..3267dc9 100644
--- a/node_breaker.lua
+++ b/node_breaker.lua
@@ -278,7 +278,7 @@ minetest.register_node("pipeworks:nodebreaker_off", {
minetest.get_meta(pos):set_string("owner", placer:get_player_name())
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
- if oldmetadata.inventory.pick then
+ if oldmetadata.inventory.pick and oldmetadata.fields.formspec then
local stack = oldmetadata.inventory.pick[1]
if not stack:is_empty() then
minetest.add_item(pos, stack)
@@ -378,7 +378,7 @@ minetest.register_node("pipeworks:nodebreaker_on", {
minetest.get_meta(pos):set_string("owner", placer:get_player_name())
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
- if oldmetadata.inventory.pick then
+ if oldmetadata.inventory.pick and oldmetadata.fields.formspec then
local stack = oldmetadata.inventory.pick[1]
if not stack:is_empty() then
minetest.add_item(pos, stack)