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
|
for g, capsdef in pairs(groupcaps_def) do
|
||||||
local mult = capsdef.tool_multiplier or 1
|
local mult = capsdef.tool_multiplier or 1
|
||||||
local eff = capsdef.efficiency or 0
|
local eff = capsdef.efficiency or 0
|
||||||
|
local uses = capsdef.uses
|
||||||
local def = mcl_autogroup.registered_diggroups[g]
|
local def = mcl_autogroup.registered_diggroups[g]
|
||||||
local level = capsdef.level or 1
|
local level = capsdef.level or 1
|
||||||
local max_level = def.levels or 0
|
local max_level = def.levels or 0
|
||||||
|
|
||||||
if max_level > 0 then
|
if max_level > 0 then
|
||||||
level = math.min(level, max_level)
|
level = math.min(level, max_level)
|
||||||
groupcaps[g .. "_0_dig"] = get_groupcap(g, false, mult, eff)
|
groupcaps[g .. "_0_dig"] = get_groupcap(g, false, mult, eff, uses)
|
||||||
groupcaps[g .. "_" .. level .. "_dig"] = get_groupcap(g, true, mult, eff)
|
groupcaps[g .. "_" .. level .. "_dig"] = get_groupcap(g, true, mult, eff, uses)
|
||||||
else
|
else
|
||||||
groupcaps[g .. "_dig"] = get_groupcap(g, true, mult, eff)
|
groupcaps[g .. "_dig"] = get_groupcap(g, true, mult, eff, uses)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return groupcaps
|
return groupcaps
|
||||||
|
|
Loading…
Reference in New Issue
Block a user