mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 21:32:57 +08:00
Improve song select startup time via better database querying. Also fix difficulty displays.
This commit is contained in:
parent
ec7bbd231f
commit
8ce18e8986
@ -54,7 +54,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BeatmapGroup(WorkingBeatmap beatmap)
|
public BeatmapGroup(WorkingBeatmap beatmap, BeatmapSetInfo set = null)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
|
|
||||||
|
@ -336,10 +336,15 @@ namespace osu.Game.Screens.Select
|
|||||||
private void addBeatmapSet(BeatmapSetInfo beatmapSet, BaseGame game)
|
private void addBeatmapSet(BeatmapSetInfo beatmapSet, BaseGame game)
|
||||||
{
|
{
|
||||||
beatmapSet = database.GetWithChildren<BeatmapSetInfo>(beatmapSet.BeatmapSetID);
|
beatmapSet = database.GetWithChildren<BeatmapSetInfo>(beatmapSet.BeatmapSetID);
|
||||||
beatmapSet.Beatmaps.ForEach(b => database.GetChildren(b));
|
beatmapSet.Beatmaps.ForEach(b =>
|
||||||
|
{
|
||||||
|
database.GetChildren(b);
|
||||||
|
if (b.Metadata == null) b.Metadata = beatmapSet.Metadata;
|
||||||
|
});
|
||||||
|
|
||||||
beatmapSet.Beatmaps = beatmapSet.Beatmaps.OrderBy(b => b.BaseDifficulty.OverallDifficulty).ToList();
|
beatmapSet.Beatmaps = beatmapSet.Beatmaps.OrderBy(b => b.BaseDifficulty.OverallDifficulty).ToList();
|
||||||
|
|
||||||
var beatmap = database.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault());
|
var beatmap = new WorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault(), beatmapSet, database);
|
||||||
|
|
||||||
var group = new BeatmapGroup(beatmap) { SelectionChanged = selectionChanged };
|
var group = new BeatmapGroup(beatmap) { SelectionChanged = selectionChanged };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user