PathOfBuilding
PathOfBuilding copied to clipboard
Change resistances display to be the same as in-game display
Fixes #1059 .
Description of the problem being solved:
Currently the stat display shows overcapped resistances which is different to how the game displays resistances when you are overcapped. This PR implements a change to align PoB to the game displays. This shouldn't be too disorienting for users as they would likely interact with the character sheet frequently in game.
An overall enhancement is made by refactoring the buildMode:FormatStat function to allow devs to provide a secondaryDisplay rather than only supporting overcapped values.
This secondaryDisplay is intended to have the model {stat?, val?, fmt}.
- If
statis provided, then val will be set byAddDisplayStatList, otherwise any fixed value can be provided inval. fmtis the full format string to exist within parenthesis in the final display.
Steps taken to verify a working solution:
- Tested all stats that utilised the
overCapStatpreviously to confirm they are working - Tested Chaos Innoculation to display the "Immune" secondary display