From 724f67cfd2bd4ba34801dde4a6ea4e6b77e20c81 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 1 Aug 2016 23:47:24 +0200 Subject: Fix bug of drops being displayed too often --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 704aa07..dbd4403 100644 --- a/init.lua +++ b/init.lua @@ -346,7 +346,7 @@ doc.new_category("nodes", { end -- Non-default drops - if data.def.drop ~= nil and data.def.drop ~= data.def.itemstring then + if data.def.drop ~= nil and data.def.drop ~= data.itemstring and data.itemstring ~= "air" then local get_desc = function(stack) local desc = minetest.registered_items[stack:get_name()].description if desc == nil then @@ -359,7 +359,7 @@ doc.new_category("nodes", { formstring = formstring .. "This block won't drop anything when mined.\n" elseif type(data.def.drop) == "string" then local dropstack = ItemStack(data.def.drop) - if dropstack:get_name() ~= data.def.itemstring and dropstack:get_name() ~= 1 then + if dropstack:get_name() ~= data.itemstring and dropstack:get_name() ~= 1 then local desc = get_desc(dropstack) local count = dropstack:get_count() local finalstring -- cgit v1.2.3