mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 19:13:21 +08:00
Compute the beatmap maximum achievable combo instead of Beatmap.MaxCombo
This commit is contained in:
parent
d36f32a9c9
commit
eca7975864
@ -65,10 +65,12 @@ namespace osu.Game.Screens.Ranking.Expanded
|
|||||||
var metadata = beatmap.BeatmapSet?.Metadata ?? beatmap.Metadata;
|
var metadata = beatmap.BeatmapSet?.Metadata ?? beatmap.Metadata;
|
||||||
string creator = metadata.Author.Username;
|
string creator = metadata.Author.Username;
|
||||||
|
|
||||||
|
int? beatmapMaxCombo = scoreManager.GetBeatmapMaximumComboAsync(score).GetResultSafely();
|
||||||
|
|
||||||
var topStatistics = new List<StatisticDisplay>
|
var topStatistics = new List<StatisticDisplay>
|
||||||
{
|
{
|
||||||
new AccuracyStatistic(score.Accuracy),
|
new AccuracyStatistic(score.Accuracy),
|
||||||
new ComboStatistic(score.MaxCombo, beatmap.MaxCombo, score.Statistics.All(stat => !stat.Key.BreaksCombo() || stat.Value == 0)),
|
new ComboStatistic(score.MaxCombo, beatmapMaxCombo),
|
||||||
new PerformanceStatistic(score),
|
new PerformanceStatistic(score),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -80,8 +82,6 @@ namespace osu.Game.Screens.Ranking.Expanded
|
|||||||
statisticDisplays.AddRange(topStatistics);
|
statisticDisplays.AddRange(topStatistics);
|
||||||
statisticDisplays.AddRange(bottomStatistics);
|
statisticDisplays.AddRange(bottomStatistics);
|
||||||
|
|
||||||
var starDifficulty = beatmapDifficultyCache.GetDifficultyAsync(beatmap, score.Ruleset, score.Mods).GetResultSafely();
|
|
||||||
|
|
||||||
AddInternal(new FillFlowContainer
|
AddInternal(new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -224,6 +224,8 @@ namespace osu.Game.Screens.Ranking.Expanded
|
|||||||
if (score.Date != default)
|
if (score.Date != default)
|
||||||
AddInternal(new PlayedOnText(score.Date));
|
AddInternal(new PlayedOnText(score.Date));
|
||||||
|
|
||||||
|
var starDifficulty = beatmapDifficultyCache.GetDifficultyAsync(beatmap, score.Ruleset, score.Mods).GetResultSafely();
|
||||||
|
|
||||||
if (starDifficulty != null)
|
if (starDifficulty != null)
|
||||||
{
|
{
|
||||||
starAndModDisplay.Add(new StarRatingDisplay(starDifficulty.Value)
|
starAndModDisplay.Add(new StarRatingDisplay(starDifficulty.Value)
|
||||||
|
@ -26,11 +26,10 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="combo">The combo to be displayed.</param>
|
/// <param name="combo">The combo to be displayed.</param>
|
||||||
/// <param name="maxCombo">The maximum value of <paramref name="combo"/>.</param>
|
/// <param name="maxCombo">The maximum value of <paramref name="combo"/>.</param>
|
||||||
/// <param name="isPerfect">Whether this is a perfect combo.</param>
|
public ComboStatistic(int combo, int? maxCombo)
|
||||||
public ComboStatistic(int combo, int? maxCombo, bool isPerfect)
|
|
||||||
: base("combo", combo, maxCombo)
|
: base("combo", combo, maxCombo)
|
||||||
{
|
{
|
||||||
this.isPerfect = isPerfect;
|
isPerfect = combo == maxCombo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Appear()
|
public override void Appear()
|
||||||
|
Loading…
Reference in New Issue
Block a user