mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-27 16:33:03 +00:00
Fix tool uses not being set in _mcl_autogroups
This commit is contained in:
parent
bb5094f657
commit
ecccc2058a
1 changed files with 4 additions and 3 deletions
|
@ -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 a new issue