Skip to content

Commit

Permalink
Tool damage fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinou committed Jul 5, 2014
1 parent 691adc7 commit 779baaf
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,25 +174,28 @@ local function add_ore(modname, description, mineral_name, oredef)
groupcaps = tooldef
}
}

if toolname == "sword" then
tdef.full_punch_interval = oredef.full_punch_interval
tdef.damage_groups = oredef.damage_groups
tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.damage_groups = oredef.damage_groups
tdef.description = S("%s Sword"):format(S(description))
end

if toolname == "pick" then
tdef.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.damage_groups = oredef.damage_groups
tdef.description = S("%s Pickaxe"):format(S(description))
end

if toolname == "axe" then
tdef.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.damage_groups = oredef.damage_groups
tdef.description = S("%s Axe"):format(S(description))
end

if toolname == "shovel" then
tdef.full_punch_interval = oredef.full_punch_interval
tdef.tool_capabilities.damage_groups = oredef.damage_groups
tdef.description = S("%s Shovel"):format(S(description))
end

Expand Down

0 comments on commit 779baaf

Please sign in to comment.