From 5febd40bd9910f73e65d4bf37b08069833828e7d Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Thu, 28 Mar 2024 22:30:39 +0900 Subject: [PATCH] Add HP and AR to LegacyBeatmapConversionDifficultyInfo --- .../LegacyBeatmapConversionDifficultyInfo.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/osu.Game/Rulesets/Scoring/Legacy/LegacyBeatmapConversionDifficultyInfo.cs b/osu.Game/Rulesets/Scoring/Legacy/LegacyBeatmapConversionDifficultyInfo.cs index 7d69069455..f8b8567305 100644 --- a/osu.Game/Rulesets/Scoring/Legacy/LegacyBeatmapConversionDifficultyInfo.cs +++ b/osu.Game/Rulesets/Scoring/Legacy/LegacyBeatmapConversionDifficultyInfo.cs @@ -18,6 +18,16 @@ namespace osu.Game.Rulesets.Scoring.Legacy /// public IRulesetInfo SourceRuleset { get; set; } = new RulesetInfo(); + /// + /// The beatmap drain rate. + /// + public float DrainRate { get; set; } + + /// + /// The beatmap approach rate. + /// + public float ApproachRate { get; set; } + /// /// The beatmap circle size. /// @@ -41,8 +51,6 @@ namespace osu.Game.Rulesets.Scoring.Legacy /// public int TotalObjectCount { get; set; } - float IBeatmapDifficultyInfo.DrainRate => 0; - float IBeatmapDifficultyInfo.ApproachRate => 0; double IBeatmapDifficultyInfo.SliderMultiplier => 0; double IBeatmapDifficultyInfo.SliderTickRate => 0; @@ -51,6 +59,8 @@ namespace osu.Game.Rulesets.Scoring.Legacy public static LegacyBeatmapConversionDifficultyInfo FromBeatmap(IBeatmap beatmap) => new LegacyBeatmapConversionDifficultyInfo { SourceRuleset = beatmap.BeatmapInfo.Ruleset, + DrainRate = beatmap.Difficulty.DrainRate, + ApproachRate = beatmap.Difficulty.ApproachRate, CircleSize = beatmap.Difficulty.CircleSize, OverallDifficulty = beatmap.Difficulty.OverallDifficulty, EndTimeObjectCount = beatmap.HitObjects.Count(h => h is IHasDuration), @@ -60,6 +70,8 @@ namespace osu.Game.Rulesets.Scoring.Legacy public static LegacyBeatmapConversionDifficultyInfo FromBeatmapInfo(IBeatmapInfo beatmapInfo) => new LegacyBeatmapConversionDifficultyInfo { SourceRuleset = beatmapInfo.Ruleset, + DrainRate = beatmapInfo.Difficulty.DrainRate, + ApproachRate = beatmapInfo.Difficulty.ApproachRate, CircleSize = beatmapInfo.Difficulty.CircleSize, OverallDifficulty = beatmapInfo.Difficulty.OverallDifficulty, EndTimeObjectCount = beatmapInfo.EndTimeObjectCount,