-
Notifications
You must be signed in to change notification settings - Fork 194
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
Prevent invalid high scores from being saved #898
Prevent invalid high scores from being saved #898
Conversation
…Song Speed is less than 100%
Fix wrong condition preventing solo scores from saving.
Refactor IsBandScoreValid to use IsSoloScoreValid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Sorry for the late review again.
After some changes below, this should be good to go!
For future proofing, it's probably better for this not to be a thing whenever band multipliers and stuff come into play. |
Thanks for the feedback, I've pushed a change that should resolve everything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is all good! I'm away right now so once I get back I'll test this in-game and this should be good to merge (if one of the other maintainers could do that, that could work too)
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% :

Or if any bots are active:
It will be fairly simple to add more rules later by extending the
ScoreContainer.IsSoloScoreValid()
andScoreContainer.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.