YARG icon indicating copy to clipboard operation
YARG copied to clipboard

Prevent invalid high scores from being saved

Open thomeval opened this issue 4 months ago • 0 comments

This PR adds validation to Band and Solo high scores, meaning that they will be considered invalid and thus not saved when certain conditions are met. This also includes a "Band score not saved" message on the Result screen. Unfortunately, it is not possible to filter out already existing invalid high scores, so the validation rules will only apply to scores set after this PR is merged.

Currently, a band high score will be considered invalid if the Song Speed is less than 100% : Screenshot 2024-10-08 142841

Or if any bots are active:

Screenshot 2024-10-10 141616

It will be fairly simple to add more rules later by extending the ScoreContainer.IsSoloScoreValid() and ScoreContainer.IsBandScoreValid() methods.

Known Limitation: In some circumstances, it is possible for a Band Score to be invalid, but a player's Solo Score to still be valid (for example, when playing with bots). In such cases, we should save the player score, but not the band score. Assuming there are no blockers preventing it, this will be addressed in the Solo High Score overhaul PR.

thomeval avatar Oct 10 '24 12:10 thomeval