diff options
author | Calinou <calinou9999spam@gmail.com> | 2013-09-08 19:57:27 +0200 |
---|---|---|
committer | Calinou <calinou9999spam@gmail.com> | 2013-09-08 19:57:27 +0200 |
commit | 53d846ba8bb8c636efafd73f7d457d6f8188fcaa (patch) | |
tree | fcea8d7562c8fe48e29c7f05187ee239d2f86d09 | |
parent | 32f2a82047bf1f64ffe56283457c5f1bccf875f4 (diff) |
Fix
-rw-r--r-- | init.lua | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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({ |