mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Fix and refactor star difficulty calculation boilerplate
Moves star difficulty calculation entry-point to Beatmap, and sets star difficulty at the correct place for song select to display.
This commit is contained in:
@ -73,7 +73,6 @@ namespace osu.Game.Database
|
||||
// Metadata
|
||||
public string Version { get; set; }
|
||||
|
||||
//todo: background threaded computation of this
|
||||
private float starDifficulty = -1;
|
||||
public float StarDifficulty
|
||||
{
|
||||
@ -85,11 +84,6 @@ namespace osu.Game.Database
|
||||
set { starDifficulty = value; }
|
||||
}
|
||||
|
||||
internal void ComputeDifficulty(BeatmapDatabase database)
|
||||
{
|
||||
StarDifficulty = (float)Ruleset.GetRuleset(Mode).CreateDifficultyCalculator(database.GetWorkingBeatmap(this).Beatmap).GetDifficulty();
|
||||
}
|
||||
|
||||
public bool Equals(BeatmapInfo other)
|
||||
{
|
||||
return ID == other?.ID;
|
||||
|
Reference in New Issue
Block a user