mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Fix tool uses not being set in _mcl_autogroups
This commit is contained in:
parent
0c90dda04c
commit
5b5a254b1a
@ -185,16 +185,17 @@ local function add_groupcaps(groupcaps, groupcaps_def)
|
||||
for g, capsdef in pairs(groupcaps_def) do
|
||||
local mult = capsdef.tool_multiplier or 1
|
||||
local eff = capsdef.efficiency or 0
|
||||
local uses = capsdef.uses
|
||||
local def = mcl_autogroup.registered_diggroups[g]
|
||||
local level = capsdef.level or 1
|
||||
local max_level = def.levels or 0
|
||||
|
||||
if max_level > 0 then
|
||||
level = math.min(level, max_level)
|
||||
groupcaps[g .. "_0_dig"] = get_groupcap(g, false, mult, eff)
|
||||
groupcaps[g .. "_" .. level .. "_dig"] = get_groupcap(g, true, mult, eff)
|
||||
groupcaps[g .. "_0_dig"] = get_groupcap(g, false, mult, eff, uses)
|
||||
groupcaps[g .. "_" .. level .. "_dig"] = get_groupcap(g, true, mult, eff, uses)
|
||||
else
|
||||
groupcaps[g .. "_dig"] = get_groupcap(g, true, mult, eff)
|
||||
groupcaps[g .. "_dig"] = get_groupcap(g, true, mult, eff, uses)
|
||||
end
|
||||
end
|
||||
return groupcaps
|
||||
|
Loading…
Reference in New Issue
Block a user