From 53d846ba8bb8c636efafd73f7d457d6f8188fcaa Mon Sep 17 00:00:00 2001 From: Calinou Date: Sun, 8 Sep 2013 19:57:27 +0200 Subject: [PATCH] Fix --- init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index c032bd0..ad51679 100644 --- a/init.lua +++ b/init.lua @@ -175,44 +175,44 @@ local function add_ore(modname, description, mineral_name, oredef) minetest.register_ore(oredef.oredef) - for toolname, tooldef in pairs(oredef.tools) do - local tooldef = { + for toolname, tdef in pairs(oredef.tools) do + local tdef = { description = "", inventory_image = toolimg_base .. toolname .. ".png", tool_capabilities = { max_drop_level=3, - groupcaps=tooldef + groupcaps=tdef } } if toolname == "sword" then - tooldef.full_punch_interval = oredef.punchint - tooldef.description = S("%s Sword"):format(S(description)) + tdef.full_punch_interval = oredef.punchint + tdef.description = S("%s Sword"):format(S(description)) end if toolname == "pick" then - tooldef.description = S("%s Pickaxe"):format(S(description)) + tdef.description = S("%s Pickaxe"):format(S(description)) end if toolname == "axe" then - tooldef.description = S("%s Axe"):format(S(description)) + tdef.description = S("%s Axe"):format(S(description)) end if toolname == "shovel" then - tooldef.description = S("%s Shovel"):format(S(description)) + tdef.description = S("%s Shovel"):format(S(description)) end if toolname == "hoe" then - tooldef.description = S("%s Hoe"):format(S(description)) + tdef.description = S("%s Hoe"):format(S(description)) local uses = tooldef.uses - tooldef.uses = nil - tooldef.on_use = function(itemstack, user, pointed_thing) + tdef.uses = nil + tdef.on_use = function(itemstack, user, pointed_thing) return hoe_on_use(itemstack, user, pointed_thing, uses) end end local fulltoolname = tool_base .. toolname .. tool_post - minetest.register_tool(fulltoolname, tooldef) + minetest.register_tool(fulltoolname, tdef) minetest.register_alias(toolname .. tool_post, fulltoolname) if oredef.makes.ingot then minetest.register_craft({