mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Remove extra members from FromDatabaseAttributes
This commit is contained in:
parent
21c0882b74
commit
c8a01c35f7
@ -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<int, double> values, int hitCircleCount, int spinnerCount)
|
||||
public override void FromDatabaseAttributes(IReadOnlyDictionary<int, double> values)
|
||||
{
|
||||
base.FromDatabase(values, hitCircleCount, spinnerCount);
|
||||
base.FromDatabaseAttributes(values);
|
||||
|
||||
StarRating = values[1];
|
||||
ApproachRate = values[7];
|
||||
|
@ -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<int, double> values, int hitCircleCount, int spinnerCount)
|
||||
public override void FromDatabaseAttributes(IReadOnlyDictionary<int, double> values)
|
||||
{
|
||||
base.FromDatabase(values, hitCircleCount, spinnerCount);
|
||||
base.FromDatabaseAttributes(values);
|
||||
|
||||
StarRating = values[11];
|
||||
GreatHitWindow = values[13];
|
||||
|
@ -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<int, double> values, int hitCircleCount, int spinnerCount)
|
||||
public override void FromDatabaseAttributes(IReadOnlyDictionary<int, double> 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]
|
||||
|
@ -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<int, double> values, int hitCircleCount, int spinnerCount)
|
||||
public override void FromDatabaseAttributes(IReadOnlyDictionary<int, double> values)
|
||||
{
|
||||
base.FromDatabase(values, hitCircleCount, spinnerCount);
|
||||
base.FromDatabaseAttributes(values);
|
||||
|
||||
MaxCombo = (int)values[9];
|
||||
StarRating = values[11];
|
||||
|
@ -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<int, double> values, int hitCircleCount, int spinnerCount)
|
||||
public virtual void FromDatabaseAttributes(IReadOnlyDictionary<int, double> values)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user