Make BeatmapStore's BeatmapDatabase private

This commit is contained in:
Dean Herbert
2017-07-27 15:34:13 +09:00
parent 96b08b8777
commit cbe7b08642
8 changed files with 85 additions and 43 deletions

View File

@ -76,13 +76,9 @@ namespace osu.Game.Screens.Menu
if (!menuMusic)
{
var query = beatmaps.Database.Query<BeatmapSetInfo>(b => !b.DeletePending);
int count = query.Count();
if (count > 0)
{
setInfo = query.ElementAt(RNG.Next(0, count - 1));
beatmaps.Database.Populate(setInfo);
}
var sets = beatmaps.GetAllUsableBeatmapSets(false);
if (sets.Count > 0)
setInfo = beatmaps.QueryBeatmapSet(s => s.ID == sets[RNG.Next(0, sets.Count - 1)].ID);
}
if (setInfo == null)