mirror of
https://github.com/ppy/osu-tools.git
synced 2025-06-09 09:35:15 +09:00
Update commands after game-side changes to accuracy/rank calculation
This commit is contained in:
parent
c9208d7d2d
commit
9012dea523
6 changed files with 15 additions and 2 deletions
|
@ -57,6 +57,7 @@ namespace PerformanceCalculator.Leaderboard
|
|||
Mod[] mods = play.Mods.Select(x => x.ToMod(ruleset)).ToArray();
|
||||
|
||||
var scoreInfo = play.ToScoreInfo(mods);
|
||||
scoreInfo.Ruleset = ruleset.RulesetInfo;
|
||||
|
||||
var score = new ProcessorScoreDecoder(working).Parse(scoreInfo);
|
||||
|
||||
|
|
|
@ -44,8 +44,10 @@ namespace PerformanceCalculator.Performance
|
|||
{
|
||||
difficultyMods = LegacyHelper.ConvertToLegacyDifficultyAdjustmentMods(workingBeatmap.BeatmapInfo, ruleset, difficultyMods);
|
||||
score.ScoreInfo.LegacyTotalScore = (int)score.ScoreInfo.TotalScore;
|
||||
LegacyScoreDecoder.PopulateMaximumStatistics(score.ScoreInfo, workingBeatmap);
|
||||
StandardisedScoreMigrationTools.UpdateFromLegacy(
|
||||
score.ScoreInfo,
|
||||
ruleset,
|
||||
LegacyBeatmapConversionDifficultyInfo.FromBeatmap(playableBeatmap),
|
||||
((ILegacyRuleset)ruleset).CreateLegacyScoreSimulator().Simulate(workingBeatmap, playableBeatmap));
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ using osu.Game.Online.API.Requests.Responses;
|
|||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Scoring.Legacy;
|
||||
using osu.Game.Scoring.Legacy;
|
||||
|
||||
namespace PerformanceCalculator.Performance
|
||||
{
|
||||
|
@ -46,8 +47,10 @@ namespace PerformanceCalculator.Performance
|
|||
score.Mods = score.Mods.Append(ruleset.CreateMod<ModClassic>()).ToArray();
|
||||
score.IsLegacyScore = true;
|
||||
score.LegacyTotalScore = (int)score.TotalScore;
|
||||
LegacyScoreDecoder.PopulateMaximumStatistics(score, workingBeatmap);
|
||||
StandardisedScoreMigrationTools.UpdateFromLegacy(
|
||||
score,
|
||||
ruleset,
|
||||
LegacyBeatmapConversionDifficultyInfo.FromAPIBeatmap(apiBeatmap),
|
||||
((ILegacyRuleset)ruleset).CreateLegacyScoreSimulator().Simulate(workingBeatmap, workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, score.Mods)));
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Scoring.Legacy;
|
||||
|
@ -23,7 +24,9 @@ namespace PerformanceCalculator
|
|||
public Score Parse(ScoreInfo scoreInfo)
|
||||
{
|
||||
var score = new Score { ScoreInfo = scoreInfo };
|
||||
PopulateLegacyAccuracyAndRank(score.ScoreInfo);
|
||||
score.ScoreInfo.LegacyTotalScore = score.ScoreInfo.TotalScore;
|
||||
LegacyScoreDecoder.PopulateMaximumStatistics(score.ScoreInfo, beatmap);
|
||||
StandardisedScoreMigrationTools.UpdateFromLegacy(score.ScoreInfo, beatmap);
|
||||
return score;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@ namespace PerformanceCalculator.Profile
|
|||
Mod[] mods = play.Mods.Select(x => x.ToMod(ruleset)).ToArray();
|
||||
|
||||
var scoreInfo = play.ToScoreInfo(mods);
|
||||
scoreInfo.Ruleset = ruleset.RulesetInfo;
|
||||
|
||||
var score = new ProcessorScoreDecoder(working).Parse(scoreInfo);
|
||||
|
||||
var difficultyCalculator = ruleset.CreateDifficultyCalculator(working);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Scoring.Legacy;
|
||||
|
@ -23,7 +24,8 @@ namespace PerformanceCalculatorGUI
|
|||
public Score Parse(ScoreInfo scoreInfo)
|
||||
{
|
||||
var score = new Score { ScoreInfo = scoreInfo };
|
||||
PopulateLegacyAccuracyAndRank(score.ScoreInfo);
|
||||
score.ScoreInfo.LegacyTotalScore = score.ScoreInfo.TotalScore;
|
||||
StandardisedScoreMigrationTools.UpdateFromLegacy(score.ScoreInfo, beatmap);
|
||||
return score;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue