diff --git a/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyAttributes.cs b/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyAttributes.cs index 3f03fc102b..ca63e87f8d 100644 --- a/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyAttributes.cs +++ b/osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyAttributes.cs @@ -12,9 +12,9 @@ namespace osu.Game.Rulesets.Catch.Difficulty [JsonProperty("approach_rate")] public double ApproachRate { get; set; } - public override IEnumerable<(int attributeId, object value)> ToDatabase() + public override IEnumerable<(int attributeId, object value)> ToDatabaseAttributes() { - foreach (var v in base.ToDatabase()) + foreach (var v in base.ToDatabaseAttributes()) yield return v; // Todo: Catch should not output star rating in the 'aim' attribute. @@ -23,9 +23,9 @@ namespace osu.Game.Rulesets.Catch.Difficulty yield return (9, MaxCombo); } - public override void FromDatabase(IReadOnlyDictionary values, int hitCircleCount, int spinnerCount) + public override void FromDatabaseAttributes(IReadOnlyDictionary values) { - base.FromDatabase(values, hitCircleCount, spinnerCount); + base.FromDatabaseAttributes(values); StarRating = values[1]; ApproachRate = values[7]; diff --git a/osu.Game.Rulesets.Mania/Difficulty/ManiaDifficultyAttributes.cs b/osu.Game.Rulesets.Mania/Difficulty/ManiaDifficultyAttributes.cs index d1cb48f728..1e663fe103 100644 --- a/osu.Game.Rulesets.Mania/Difficulty/ManiaDifficultyAttributes.cs +++ b/osu.Game.Rulesets.Mania/Difficulty/ManiaDifficultyAttributes.cs @@ -15,9 +15,9 @@ namespace osu.Game.Rulesets.Mania.Difficulty [JsonProperty("score_multiplier")] public double ScoreMultiplier { get; set; } - public override IEnumerable<(int attributeId, object value)> ToDatabase() + public override IEnumerable<(int attributeId, object value)> ToDatabaseAttributes() { - foreach (var v in base.ToDatabase()) + foreach (var v in base.ToDatabaseAttributes()) yield return v; // Todo: Mania doesn't output MaxCombo attribute for some reason. @@ -26,9 +26,9 @@ namespace osu.Game.Rulesets.Mania.Difficulty yield return (15, ScoreMultiplier); } - public override void FromDatabase(IReadOnlyDictionary values, int hitCircleCount, int spinnerCount) + public override void FromDatabaseAttributes(IReadOnlyDictionary values) { - base.FromDatabase(values, hitCircleCount, spinnerCount); + base.FromDatabaseAttributes(values); StarRating = values[11]; GreatHitWindow = values[13]; diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs index 089f163dfb..88f26db93c 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs @@ -42,9 +42,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty [JsonIgnore] public int SpinnerCount { get; set; } - public override IEnumerable<(int attributeId, object value)> ToDatabase() + public override IEnumerable<(int attributeId, object value)> ToDatabaseAttributes() { - foreach (var v in base.ToDatabase()) + foreach (var v in base.ToDatabaseAttributes()) yield return v; yield return (1, AimStrain); @@ -60,9 +60,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty yield return (19, SliderFactor); } - public override void FromDatabase(IReadOnlyDictionary values, int hitCircleCount, int spinnerCount) + public override void FromDatabaseAttributes(IReadOnlyDictionary values) { - base.FromDatabase(values, hitCircleCount, spinnerCount); + base.FromDatabaseAttributes(values); AimStrain = values[1]; SpeedStrain = values[3]; @@ -72,8 +72,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty StarRating = values[11]; FlashlightRating = values.GetValueOrDefault(17); SliderFactor = values[19]; - HitCircleCount = hitCircleCount; - SpinnerCount = spinnerCount; } [UsedImplicitly] diff --git a/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyAttributes.cs b/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyAttributes.cs index b2208ea617..a6057d7952 100644 --- a/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyAttributes.cs +++ b/osu.Game.Rulesets.Taiko/Difficulty/TaikoDifficultyAttributes.cs @@ -24,9 +24,9 @@ namespace osu.Game.Rulesets.Taiko.Difficulty [JsonProperty("great_hit_window")] public double GreatHitWindow { get; set; } - public override IEnumerable<(int attributeId, object value)> ToDatabase() + public override IEnumerable<(int attributeId, object value)> ToDatabaseAttributes() { - foreach (var v in base.ToDatabase()) + foreach (var v in base.ToDatabaseAttributes()) yield return v; yield return (9, MaxCombo); @@ -34,9 +34,9 @@ namespace osu.Game.Rulesets.Taiko.Difficulty yield return (13, GreatHitWindow); } - public override void FromDatabase(IReadOnlyDictionary values, int hitCircleCount, int spinnerCount) + public override void FromDatabaseAttributes(IReadOnlyDictionary values) { - base.FromDatabase(values, hitCircleCount, spinnerCount); + base.FromDatabaseAttributes(values); MaxCombo = (int)values[9]; StarRating = values[11]; diff --git a/osu.Game/Rulesets/Difficulty/DifficultyAttributes.cs b/osu.Game/Rulesets/Difficulty/DifficultyAttributes.cs index 6a3b97ab1d..e25a8476f0 100644 --- a/osu.Game/Rulesets/Difficulty/DifficultyAttributes.cs +++ b/osu.Game/Rulesets/Difficulty/DifficultyAttributes.cs @@ -34,9 +34,9 @@ namespace osu.Game.Rulesets.Difficulty StarRating = starRating; } - public virtual IEnumerable<(int attributeId, object value)> ToDatabase() => Enumerable.Empty<(int, object)>(); + public virtual IEnumerable<(int attributeId, object value)> ToDatabaseAttributes() => Enumerable.Empty<(int, object)>(); - public virtual void FromDatabase(IReadOnlyDictionary values, int hitCircleCount, int spinnerCount) + public virtual void FromDatabaseAttributes(IReadOnlyDictionary values) { } }