mirror of
https://github.com/ppy/osu
synced 2025-01-01 20:02:14 +00:00
Merge pull request #24957 from bdach/solo-score-info-get-display-score
Add `GetDisplayScore()` extension for `SoloScoreInfo`
This commit is contained in:
commit
d5472d3524
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Scoring.Legacy
|
||||
@ -16,6 +17,9 @@ namespace osu.Game.Scoring.Legacy
|
||||
public static long GetDisplayScore(this ScoreInfo scoreInfo, ScoringMode mode)
|
||||
=> getDisplayScore(scoreInfo.Ruleset.OnlineID, scoreInfo.TotalScore, mode, scoreInfo.MaximumStatistics);
|
||||
|
||||
public static long GetDisplayScore(this SoloScoreInfo soloScoreInfo, ScoringMode mode)
|
||||
=> getDisplayScore(soloScoreInfo.RulesetID, soloScoreInfo.TotalScore, mode, soloScoreInfo.MaximumStatistics);
|
||||
|
||||
private static long getDisplayScore(int rulesetId, long score, ScoringMode mode, IReadOnlyDictionary<HitResult, int> maximumStatistics)
|
||||
{
|
||||
if (mode == ScoringMode.Standardised)
|
||||
|
Loading…
Reference in New Issue
Block a user