Fix more issues with Technic item drop
This commit is contained in:
parent
dde01e0455
commit
d30d3575e5
@ -5,7 +5,7 @@ if(itemDrop ~= "" and itemDrop ~= nil) then
|
|||||||
local code = "local tool = digger:get_wielded_item():get_name()\n"..
|
local code = "local tool = digger:get_wielded_item():get_name()\n"..
|
||||||
"if(tool:find('superheat') ~= nil)then\n"..
|
"if(tool:find('superheat') ~= nil)then\n"..
|
||||||
"output = minetest.get_craft_result({method='cooking', items={name}})\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"
|
"end\n"
|
||||||
local readfile = io.open(itemDrop.."/init.lua", "r")
|
local readfile = io.open(itemDrop.."/init.lua", "r")
|
||||||
local newfile = ""
|
local newfile = ""
|
||||||
@ -29,7 +29,7 @@ if(itemDrop ~= "" and itemDrop ~= nil) then
|
|||||||
|
|
||||||
end
|
end
|
||||||
io.close()
|
io.close()
|
||||||
local file = io.open(itemDrop.."/item_drop.lua", "w")
|
local file = io.open(itemDrop.."/init.lua", "w")
|
||||||
file:write(newfile)
|
file:write(newfile)
|
||||||
io.flush()
|
io.flush()
|
||||||
io.close()
|
io.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user