You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sort the Calculations Tab breakdown lists by value (#7211)
* Sort the CalcBreakdownControl list by value.
There is already a sort by type, but this is not used for a lot of
breakdowns. Applying a sort by value should make it easier to read the
breakdown without disrupting the sort by type.
* Sort the CalcBreakdownControl taking in consideration boolean values.
Some breakdowns can contain a mix of `number` and `boolean`. e.g. the skill buffs breakdown if you have a golem active will have a `Condition: have golem` with value of `true`.
The values in this kind of breakdown are pretty sparse and sorting them in a coherent way is not easy, so for the sake of this PR we can just keep skip(return false) when comparing number and boolean.
* Use a copy of the modList in CalcBreakdownControl
If we try to sort on the original modlist, we'll actually change the order of the values in memory and next time we sort again, some of the mods can move position.
Using a copy of the table--which will be discarded after use--will prevent this.
* Sort generic breakdown and slots
Breakdowns can also accept direct breakdown tables and slots values. These also need to be sorted by value.
0 commit comments