Fix mod order when crafting Grafts (#9163)
Some graft mods had identical statOrder values and the same level requirement so it would then fall back to the random order the pairs list added the mods in Instead now we sort based on Id if the statOrder and level values are the same Making the change also requires change the lastSeries list to no longer prepend the values Co-authored-by: LocalIdentity <localidentity2@gmail.com>
This commit is contained in:
@@ -1753,7 +1753,10 @@ function ItemsTabClass:UpdateAffixControl(control, item, type, outputTable, outp
|
||||
return modA.statOrder[i] < modB.statOrder[i]
|
||||
end
|
||||
end
|
||||
return modA.level > modB.level
|
||||
if modA.level ~= modB.level then
|
||||
return modA.level < modB.level
|
||||
end
|
||||
return a < b
|
||||
end)
|
||||
control.selIndex = 1
|
||||
control.list = { "None" }
|
||||
@@ -1797,7 +1800,7 @@ function ItemsTabClass:UpdateAffixControl(control, item, type, outputTable, outp
|
||||
if selAffix == modId then
|
||||
control.selIndex = #control.list
|
||||
end
|
||||
t_insert(lastSeries.modList, 1, modId)
|
||||
t_insert(lastSeries.modList, modId)
|
||||
if #lastSeries.modList == 2 then
|
||||
lastSeries.label = lastSeries.label:gsub("%(%-?[%d%.]+%-%-?[%d%.]+%)","#"):gsub("%-?%d+%.?%d*","#")
|
||||
lastSeries.haveRange = true
|
||||
|
||||
Reference in New Issue
Block a user