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

Disallow classic mod from giving PP (for now) #180

Merged
merged 7 commits into from
Dec 14, 2023

Conversation

smoogipoo
Copy link
Contributor

@smoogipoo smoogipoo commented Dec 13, 2023

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.

@@ -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;
Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm...

// 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?

Copy link
Collaborator

@bdach bdach Dec 13, 2023

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

if (item.Score.ScoreInfo.LegacyScoreId != null)
{
item.Tags = new[] { "type:legacy" };
return;
}

as places that use the other method. If there is some material difference I'm not aware of then maybe that's fine.

Copy link
Contributor Author

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.

@bdach bdach self-requested a review December 13, 2023 08:39
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.
@bdach
Copy link
Collaborator

bdach commented Dec 13, 2023

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.

@smoogipoo
Copy link
Contributor Author

Looks fine to me

@peppy peppy self-requested a review December 14, 2023 03:51
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.
@peppy peppy merged commit 25de63a into ppy:master Dec 14, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants