mirror of
https://github.com/ppy/osu
synced 2024-12-27 01:12:45 +00:00
Fix stable scores showing with faded out pp display due to classic mod presence
This commit is contained in:
parent
8506da725d
commit
7c4c8ee75c
@ -4,6 +4,7 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@ -17,6 +18,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
|
||||
namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
{
|
||||
@ -74,7 +76,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
Alpha = 0.5f;
|
||||
TooltipText = ResultsScreenStrings.NoPPForUnrankedBeatmaps;
|
||||
}
|
||||
else if (scoreInfo.Mods.Any(m => !m.Ranked))
|
||||
else if (hasUnrankedMods(scoreInfo))
|
||||
{
|
||||
Alpha = 0.5f;
|
||||
TooltipText = ResultsScreenStrings.NoPPForUnrankedMods;
|
||||
@ -87,6 +89,16 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
}
|
||||
}
|
||||
|
||||
private static bool hasUnrankedMods(ScoreInfo scoreInfo)
|
||||
{
|
||||
IEnumerable<Mod> modsToCheck = scoreInfo.Mods;
|
||||
|
||||
if (scoreInfo.IsLegacyScore)
|
||||
modsToCheck = modsToCheck.Where(m => m is not ModClassic);
|
||||
|
||||
return modsToCheck.Any(m => !m.Ranked);
|
||||
}
|
||||
|
||||
public override void Appear()
|
||||
{
|
||||
base.Appear();
|
||||
|
Loading…
Reference in New Issue
Block a user