-
Notifications
You must be signed in to change notification settings - Fork 11
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
Disallow classic mod from giving PP (for now) #180
Conversation
@@ -191,6 +191,10 @@ public static bool AllModsValidForPerformance(Mod[] mods) | |||
|
|||
continue; | |||
|
|||
case ModClassic: | |||
// Classic mod is only allowed if it's attached to legacy scores (null build ID). | |||
return score.BuildID == null; |
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.
Isn't examining that LegacyScoreID
is not null the standard / canonical way to check if a SoloScoreInfo
is legacy or not? I worry about introducing multiple heuristics for the same thing.
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.
Hmmm...
Lines 119 to 124 in 3def493
// Scores with no build were imported from the legacy high scores tables and are always valid. | |
if (s.ScoreInfo.BuildID == null) | |
return false; | |
// Performance needs to be allowed for the build. | |
return buildStore.GetBuild(s.ScoreInfo.BuildID.Value)?.allow_performance != true; |
@peppy any opinions?
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.
Just for context, I'm referring to
Lines 101 to 105 in 3def493
if (item.Score.ScoreInfo.LegacyScoreId != null) | |
{ | |
item.Tags = new[] { "type:legacy" }; | |
return; | |
} |
Lines 78 to 79 in 3def493
if (score.ScoreInfo.LegacyScoreId == null) | |
continue; |
as places that use the other method. If there is some material difference I'm not aware of then maybe that's fine.
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.
Will wait on a new osu! nuget package before fixing this.
ce908c2
to
798c825
Compare
With the introduced logic rejecting scores with a null build ID from being processed, one of the tests began failing due to having a null build ID. Fixing this while preserving that added logic (which seems prudent) is however annoying as it requires a build to exist in the database with `allow_performance` set to 1.
I have attempted to fix test failures here but I am not sure everyone will agree as to what I did, so please scrutinise b9b51ac especially at your discretion. Rest seems fine to me. |
Looks fine to me |
Having it as a commented check makes me nervous about every other case which is using the `IsLegacyScore` flag, so let's just commit to this.
Since we're not sure yet on the implementation of the mechanics of this mod (e.g. ppy/osu#11769), it's easiest to just not allow it to be ranked for now. Scores coming from stable are still allowed to give PP.