mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Rename BeatmapInfo.StarDifficulty
to StarRating
to match underlying interface
This commit is contained in:
@ -139,7 +139,8 @@ namespace osu.Game.Beatmaps
|
||||
private string versionString => string.IsNullOrEmpty(Version) ? string.Empty : $"[{Version}]";
|
||||
|
||||
[JsonProperty("difficulty_rating")]
|
||||
public double StarDifficulty { get; set; }
|
||||
[Column("StarDifficulty")]
|
||||
public double StarRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Currently only populated for beatmap deletion. Use <see cref="ScoreManager"/> to query scores.
|
||||
@ -147,7 +148,7 @@ namespace osu.Game.Beatmaps
|
||||
public List<ScoreInfo> Scores { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public DifficultyRating DifficultyRating => BeatmapDifficultyCache.GetDifficultyRating(StarDifficulty);
|
||||
public DifficultyRating DifficultyRating => BeatmapDifficultyCache.GetDifficultyRating(StarRating);
|
||||
|
||||
public override string ToString() => this.GetDisplayTitle();
|
||||
|
||||
@ -197,9 +198,6 @@ namespace osu.Game.Beatmaps
|
||||
[JsonIgnore]
|
||||
IRulesetInfo IBeatmapInfo.Ruleset => Ruleset;
|
||||
|
||||
[JsonIgnore]
|
||||
double IBeatmapInfo.StarRating => StarDifficulty;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ namespace osu.Game.Beatmaps
|
||||
beatmap.BeatmapInfo.Ruleset = ruleset;
|
||||
|
||||
// TODO: this should be done in a better place once we actually need to dynamically update it.
|
||||
beatmap.BeatmapInfo.StarDifficulty = ruleset?.CreateInstance().CreateDifficultyCalculator(new DummyConversionBeatmap(beatmap)).Calculate().StarRating ?? 0;
|
||||
beatmap.BeatmapInfo.StarRating = ruleset?.CreateInstance().CreateDifficultyCalculator(new DummyConversionBeatmap(beatmap)).Calculate().StarRating ?? 0;
|
||||
beatmap.BeatmapInfo.Length = calculateLength(beatmap);
|
||||
beatmap.BeatmapInfo.BPM = 60000 / beatmap.GetMostCommonBeatLength();
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Beatmaps
|
||||
/// <summary>
|
||||
/// The maximum star difficulty of all beatmaps in this set.
|
||||
/// </summary>
|
||||
public double MaxStarDifficulty => Beatmaps?.Max(b => b.StarDifficulty) ?? 0;
|
||||
public double MaxStarDifficulty => Beatmaps?.Max(b => b.StarRating) ?? 0;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum playable length in milliseconds of all beatmaps in this set.
|
||||
|
@ -64,7 +64,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
BeatmapInfo beatmapInfo = beatmaps.Where(b => b.Ruleset.Equals(r)).OrderBy(b =>
|
||||
{
|
||||
double difference = b.StarDifficulty - recommendation;
|
||||
double difference = b.StarRating - recommendation;
|
||||
return difference >= 0 ? difference * 2 : difference * -1; // prefer easier over harder
|
||||
}).FirstOrDefault();
|
||||
|
||||
|
Reference in New Issue
Block a user