mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Remove ScoreManager.GetTotalScore()
This commit is contained in:
parent
510b8e4c78
commit
f3591f83a2
@ -75,7 +75,7 @@ namespace osu.Game.Scoring
|
||||
/// <param name="scores">The array of <see cref="ScoreInfo"/>s to reorder.</param>
|
||||
/// <returns>The given <paramref name="scores"/> ordered by decreasing total score.</returns>
|
||||
public IEnumerable<ScoreInfo> OrderByTotalScore(IEnumerable<ScoreInfo> scores)
|
||||
=> scores.OrderByDescending(s => GetTotalScore(s))
|
||||
=> scores.OrderByDescending(s => s.TotalScore)
|
||||
.ThenBy(s => s.OnlineID)
|
||||
// Local scores may not have an online ID. Fall back to date in these cases.
|
||||
.ThenBy(s => s.Date);
|
||||
@ -88,7 +88,7 @@ namespace osu.Game.Scoring
|
||||
/// </remarks>
|
||||
/// <param name="score">The <see cref="ScoreInfo"/> to retrieve the bindable for.</param>
|
||||
/// <returns>The bindable containing the total score.</returns>
|
||||
public Bindable<long> GetBindableTotalScore([NotNull] ScoreInfo score) => new TotalScoreBindable(score, this, configManager);
|
||||
public Bindable<long> GetBindableTotalScore([NotNull] ScoreInfo score) => new TotalScoreBindable(score, configManager);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a bindable that represents the formatted total score string of a <see cref="ScoreInfo"/>.
|
||||
@ -100,14 +100,6 @@ namespace osu.Game.Scoring
|
||||
/// <returns>The bindable containing the formatted total score string.</returns>
|
||||
public Bindable<string> GetBindableTotalScoreString([NotNull] ScoreInfo score) => new TotalScoreStringBindable(GetBindableTotalScore(score));
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the total score of a <see cref="ScoreInfo"/> in the given <see cref="ScoringMode"/>.
|
||||
/// </summary>
|
||||
/// <param name="score">The <see cref="ScoreInfo"/> to calculate the total score of.</param>
|
||||
/// <param name="mode">The <see cref="ScoringMode"/> to return the total score as.</param>
|
||||
/// <returns>The total score.</returns>
|
||||
public long GetTotalScore([NotNull] ScoreInfo score, ScoringMode mode = ScoringMode.Standardised) => score.GetDisplayScore(mode);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the maximum achievable combo for the provided score.
|
||||
/// </summary>
|
||||
@ -126,12 +118,11 @@ namespace osu.Game.Scoring
|
||||
/// Creates a new <see cref="TotalScoreBindable"/>.
|
||||
/// </summary>
|
||||
/// <param name="score">The <see cref="ScoreInfo"/> to provide the total score of.</param>
|
||||
/// <param name="scoreManager">The <see cref="ScoreManager"/>.</param>
|
||||
/// <param name="configManager">The config.</param>
|
||||
public TotalScoreBindable(ScoreInfo score, ScoreManager scoreManager, OsuConfigManager configManager)
|
||||
public TotalScoreBindable(ScoreInfo score, OsuConfigManager configManager)
|
||||
{
|
||||
configManager?.BindWith(OsuSetting.ScoreDisplayMode, scoringMode);
|
||||
scoringMode.BindValueChanged(mode => Value = scoreManager.GetTotalScore(score, mode.NewValue), true);
|
||||
scoringMode.BindValueChanged(mode => Value = score.GetDisplayScore(mode.NewValue), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ namespace osu.Game.Screens.Ranking
|
||||
|
||||
var score = trackingContainer.Panel.Score;
|
||||
|
||||
flow.SetLayoutPosition(trackingContainer, scoreManager.GetTotalScore(score));
|
||||
flow.SetLayoutPosition(trackingContainer, score.TotalScore);
|
||||
|
||||
trackingContainer.Show();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user