1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 08:03:12 +08:00

Merge pull request #12617 from Joehuu/fix-pp-column-approved-maps

Fix approved maps not displaying pp column on score table
This commit is contained in:
Dean Herbert 2021-05-02 13:27:39 +09:00 committed by GitHub
commit 2e24b69d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -14,4 +14,10 @@ namespace osu.Game.Beatmaps
Qualified = 3,
Loved = 4,
}
public static class BeatmapSetOnlineStatusExtensions
{
public static bool GrantsPerformancePoints(this BeatmapSetOnlineStatus status)
=> status == BeatmapSetOnlineStatus.Ranked || status == BeatmapSetOnlineStatus.Approved;
}
}

View File

@ -60,7 +60,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
var scoreInfos = value.Scores.Select(s => s.CreateScoreInfo(rulesets)).ToList();
var topScore = scoreInfos.First();
scoreTable.DisplayScores(scoreInfos, topScore.Beatmap?.Status == BeatmapSetOnlineStatus.Ranked);
scoreTable.DisplayScores(scoreInfos, topScore.Beatmap?.Status.GrantsPerformancePoints() == true);
scoreTable.Show();
var userScore = value.UserScore;

View File

@ -111,7 +111,8 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
accuracyColumn.Text = value.DisplayAccuracy;
maxComboColumn.Text = $@"{value.MaxCombo:N0}x";
ppColumn.Alpha = value.Beatmap?.Status == BeatmapSetOnlineStatus.Ranked ? 1 : 0;
ppColumn.Alpha = value.Beatmap?.Status.GrantsPerformancePoints() == true ? 1 : 0;
ppColumn.Text = $@"{value.PP:N0}";
statisticsColumns.ChildrenEnumerable = value.GetStatisticsForDisplay().Select(createStatisticsColumn);