Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for resetting Search Weights in Item Trader #7261

Conversation

Peechey
Copy link
Contributor

@Peechey Peechey commented Jan 18, 2024

Description of the problem being solved:

Since we've introduced saving search weights to the build, I thought it would be a good idea to have a way to reset them without needing to jump into the xml, especially if you have a ton of weights set up.

Steps taken to verify a working solution:

  • Resetting should default to FullDPS and TotalEHP stat weighting
  • Resetting should work on init popup load and after any updates are made
  • Resetting and then Canceling should revert back to previous weights
  • Save and Cancel functionality should be unaffected, outside of the reverting mentioned

After screenshot:

image

resetWeightings

PS: I'm aware if you hit Reset twice you lose the previous weights, but I have not figured out a clean solution yet because you kinda have to hardcode compare to the default list's stats and weightMultis.
Pushed an update for this, still hardcoding a little gross but I moved the boolean function near the other hardcoded logic so they're at least in the same place for visibility.

@Peechey Peechey added the enhancement New feature, calculation, or mod label Jan 18, 2024
@LocalIdentity LocalIdentity merged commit 8bc02c3 into PathOfBuildingCommunity:dev Jan 21, 2024
2 checks passed
@Peechey Peechey deleted the feature/reset_trade_stat_weights branch January 23, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, calculation, or mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants