1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:23:20 +08:00

Fix beatmap attribute tests

This commit is contained in:
minisbett 2024-11-18 17:16:07 +01:00
parent c5d5a5b342
commit 11cb9e72f5
No known key found for this signature in database
GPG Key ID: 2DB6D529C95A0403

View File

@ -209,7 +209,7 @@ namespace osu.Game.Tests.Visual.UserInterface
} }
protected override IDifficultyAttributes CreateDifficultyAttributes(IBeatmap beatmap, Mod[] mods, Skill[] skills, double clockRate) protected override IDifficultyAttributes CreateDifficultyAttributes(IBeatmap beatmap, Mod[] mods, Skill[] skills, double clockRate)
=> new EmptyDifficultyAttributes(); => new EmptyDifficultyAttributes { StarRating = mods.OfType<TestMod>().SingleOrDefault()?.Difficulty.Value ?? 0 };
protected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) protected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate)
=> Array.Empty<DifficultyHitObject>(); => Array.Empty<DifficultyHitObject>();
@ -226,7 +226,7 @@ namespace osu.Game.Tests.Visual.UserInterface
} }
protected override IPerformanceAttributes CreatePerformanceAttributes(ScoreInfo score, IDifficultyAttributes attributes) protected override IPerformanceAttributes CreatePerformanceAttributes(ScoreInfo score, IDifficultyAttributes attributes)
=> new EmptyPerformanceAttributes(); => new EmptyPerformanceAttributes() { Total = score.Mods.OfType<TestMod>().SingleOrDefault()?.Performance.Value ?? 0 };
} }
private class TestMod : Mod private class TestMod : Mod