Obsolete BeatmapInfo.MaxCombo and suppress in usages

This commit is contained in:
Salman Ahmed
2022-03-20 16:30:28 +03:00
parent 6f47f7ffc8
commit b9859f9f21
5 changed files with 9 additions and 2 deletions

View File

@ -172,9 +172,10 @@ namespace osu.Game.Beatmaps
/// <summary> /// <summary>
/// The maximum achievable combo on this beatmap, populated for online info purposes only. /// The maximum achievable combo on this beatmap, populated for online info purposes only.
/// Todo: This should never be used nor exist, but is still relied on in <see cref="ScoresContainer.Scores"/> since <see cref="IBeatmapInfo"/> can't be used yet. /// Todo: This should never be used nor exist, but is still relied on in <see cref="ScoresContainer.Scores"/> since <see cref="IBeatmapInfo"/> can't be used yet. For now this is obsoleted until it is removed.
/// </summary> /// </summary>
[Ignored] [Ignored]
[Obsolete("Use ScoreManager.GetMaximumAchievableComboAsync instead.")]
public int? MaxCombo { get; set; } public int? MaxCombo { get; set; }
[Ignored] [Ignored]

View File

@ -173,7 +173,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{ {
Text = score.MaxCombo.ToLocalisableString(@"0\x"), Text = score.MaxCombo.ToLocalisableString(@"0\x"),
Font = OsuFont.GetFont(size: text_size), Font = OsuFont.GetFont(size: text_size),
#pragma warning disable 618
Colour = score.MaxCombo == score.BeatmapInfo.MaxCombo ? highAccuracyColour : Color4.White Colour = score.MaxCombo == score.BeatmapInfo.MaxCombo ? highAccuracyColour : Color4.White
#pragma warning restore 618
} }
}; };

View File

@ -78,7 +78,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
// TODO: temporary. should be removed once `OrderByTotalScore` can accept `IScoreInfo`. // TODO: temporary. should be removed once `OrderByTotalScore` can accept `IScoreInfo`.
var beatmapInfo = new BeatmapInfo var beatmapInfo = new BeatmapInfo
{ {
#pragma warning disable 618
MaxCombo = apiBeatmap.MaxCombo, MaxCombo = apiBeatmap.MaxCombo,
#pragma warning restore 618
Status = apiBeatmap.Status, Status = apiBeatmap.Status,
MD5Hash = apiBeatmap.MD5Hash MD5Hash = apiBeatmap.MD5Hash
}; };

View File

@ -157,7 +157,7 @@ namespace osu.Game.Scoring
public LocalisableString DisplayAccuracy => Accuracy.FormatAccuracy(); public LocalisableString DisplayAccuracy => Accuracy.FormatAccuracy();
/// <summary> /// <summary>
/// Whether this <see cref="EFScoreInfo"/> represents a legacy (osu!stable) score. /// Whether this <see cref="ScoreInfo"/> represents a legacy (osu!stable) score.
/// </summary> /// </summary>
[Ignored] [Ignored]
public bool IsLegacyScore => Mods.OfType<ModClassic>().Any(); public bool IsLegacyScore => Mods.OfType<ModClassic>().Any();

View File

@ -160,8 +160,10 @@ namespace osu.Game.Scoring
{ {
// This score is guaranteed to be an osu!stable score. // This score is guaranteed to be an osu!stable score.
// The combo must be determined through either the beatmap's max combo value or the difficulty calculator, as lazer's scoring has changed and the score statistics cannot be used. // The combo must be determined through either the beatmap's max combo value or the difficulty calculator, as lazer's scoring has changed and the score statistics cannot be used.
#pragma warning disable CS0618
if (score.BeatmapInfo.MaxCombo != null) if (score.BeatmapInfo.MaxCombo != null)
return score.BeatmapInfo.MaxCombo.Value; return score.BeatmapInfo.MaxCombo.Value;
#pragma warning restore CS0618
if (difficulties == null) if (difficulties == null)
return null; return null;