PathOfBuilding icon indicating copy to clipboard operation
PathOfBuilding copied to clipboard

Change resistances display to be the same as in-game display

Open sida-wang opened this issue 1 year ago • 0 comments

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 stat is provided, then val will be set by AddDisplayStatList, otherwise any fixed value can be provided in val.
  • fmt is 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 overCapStat previously to confirm they are working
  • Tested Chaos Innoculation to display the "Immune" secondary display

After screenshot:

image

sida-wang avatar Jan 20 '24 23:01 sida-wang