mirror of
https://github.com/minetest-mods/moreores.git
synced 2024-12-22 13:52:25 +01:00
Tool damage fix.
This commit is contained in:
parent
691adc7893
commit
779baaf3de
17
init.lua
17
init.lua
@ -174,25 +174,28 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||||||
groupcaps = tooldef
|
groupcaps = tooldef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if toolname == "sword" then
|
if toolname == "sword" then
|
||||||
tdef.full_punch_interval = oredef.full_punch_interval
|
tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval
|
||||||
tdef.damage_groups = oredef.damage_groups
|
tdef.tool_capabilities.damage_groups = oredef.damage_groups
|
||||||
tdef.description = S("%s Sword"):format(S(description))
|
tdef.description = S("%s Sword"):format(S(description))
|
||||||
end
|
end
|
||||||
|
|
||||||
if toolname == "pick" then
|
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))
|
tdef.description = S("%s Pickaxe"):format(S(description))
|
||||||
end
|
end
|
||||||
|
|
||||||
if toolname == "axe" then
|
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))
|
tdef.description = S("%s Axe"):format(S(description))
|
||||||
end
|
end
|
||||||
|
|
||||||
if toolname == "shovel" then
|
if toolname == "shovel" then
|
||||||
tdef.full_punch_interval = oredef.full_punch_interval
|
tdef.full_punch_interval = oredef.full_punch_interval
|
||||||
|
tdef.tool_capabilities.damage_groups = oredef.damage_groups
|
||||||
tdef.description = S("%s Shovel"):format(S(description))
|
tdef.description = S("%s Shovel"):format(S(description))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user