mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:43:22 +08: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
|
#nullable disable
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -17,6 +18,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Resources.Localisation.Web;
|
using osu.Game.Resources.Localisation.Web;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||||
{
|
{
|
||||||
@ -74,7 +76,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
|||||||
Alpha = 0.5f;
|
Alpha = 0.5f;
|
||||||
TooltipText = ResultsScreenStrings.NoPPForUnrankedBeatmaps;
|
TooltipText = ResultsScreenStrings.NoPPForUnrankedBeatmaps;
|
||||||
}
|
}
|
||||||
else if (scoreInfo.Mods.Any(m => !m.Ranked))
|
else if (hasUnrankedMods(scoreInfo))
|
||||||
{
|
{
|
||||||
Alpha = 0.5f;
|
Alpha = 0.5f;
|
||||||
TooltipText = ResultsScreenStrings.NoPPForUnrankedMods;
|
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()
|
public override void Appear()
|
||||||
{
|
{
|
||||||
base.Appear();
|
base.Appear();
|
||||||
|
Loading…
Reference in New Issue
Block a user