From d30d3575e5844fcfaaebfab4b0848356b5a4edbf Mon Sep 17 00:00:00 2001 From: Austin Shenk Date: Sun, 30 Jun 2013 16:00:40 -0400 Subject: [PATCH] Fix more issues with Technic item drop --- externalmodify.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/externalmodify.lua b/externalmodify.lua index 3abc74d..b466296 100644 --- a/externalmodify.lua +++ b/externalmodify.lua @@ -5,7 +5,7 @@ if(itemDrop ~= "" and itemDrop ~= nil) then local code = "local tool = digger:get_wielded_item():get_name()\n".. "if(tool:find('superheat') ~= nil)then\n".. "output = minetest.get_craft_result({method='cooking', items={name}})\n".. - "if(output.item ~= nil)then name = output.item:get_name()end\n".. + "if(not output.item:is_empty())then name = output.item:get_name()end\n".. "end\n" local readfile = io.open(itemDrop.."/init.lua", "r") local newfile = "" @@ -29,7 +29,7 @@ if(itemDrop ~= "" and itemDrop ~= nil) then end io.close() - local file = io.open(itemDrop.."/item_drop.lua", "w") + local file = io.open(itemDrop.."/init.lua", "w") file:write(newfile) io.flush() io.close()