summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalinou <calinou9999spam@gmail.com>2013-09-08 19:30:49 +0200
committerCalinou <calinou9999spam@gmail.com>2013-09-08 19:30:49 +0200
commit32f2a82047bf1f64ffe56283457c5f1bccf875f4 (patch)
tree451c629f5e6156fe3cc9210172f85eeb969cc215
parent7595c898d2f83aca48db61f6258d344c44530098 (diff)
Change tdef to tooldef
-rw-r--r--init.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/init.lua b/init.lua
index 79f3e2d..c032bd0 100644
--- a/init.lua
+++ b/init.lua
@@ -176,7 +176,7 @@ local function add_ore(modname, description, mineral_name, oredef)
minetest.register_ore(oredef.oredef)
for toolname, tooldef in pairs(oredef.tools) do
- local tdef = {
+ local tooldef = {
description = "",
inventory_image = toolimg_base .. toolname .. ".png",
tool_capabilities = {
@@ -186,33 +186,33 @@ local function add_ore(modname, description, mineral_name, oredef)
}
if toolname == "sword" then
- tdef.full_punch_interval = oredef.punchint
- tdef.description = S("%s Sword"):format(S(description))
+ tooldef.full_punch_interval = oredef.punchint
+ tooldef.description = S("%s Sword"):format(S(description))
end
if toolname == "pick" then
- tdef.description = S("%s Pickaxe"):format(S(description))
+ tooldef.description = S("%s Pickaxe"):format(S(description))
end
if toolname == "axe" then
- tdef.description = S("%s Axe"):format(S(description))
+ tooldef.description = S("%s Axe"):format(S(description))
end
if toolname == "shovel" then
- tdef.description = S("%s Shovel"):format(S(description))
+ tooldef.description = S("%s Shovel"):format(S(description))
end
if toolname == "hoe" then
- tdef.description = S("%s Hoe"):format(S(description))
- local uses = tdef.uses
- tdef.uses = nil
- tdef.on_use = function(itemstack, user, pointed_thing)
+ tooldef.description = S("%s Hoe"):format(S(description))
+ local uses = tooldef.uses
+ tooldef.uses = nil
+ tooldef.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, tdef)
+ minetest.register_tool(fulltoolname, tooldef)
minetest.register_alias(toolname .. tool_post, fulltoolname)
if oredef.makes.ingot then
minetest.register_craft({