1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Merge remote-tracking branch 'smoogipooo/remove-playmode' into better-conversion

This commit is contained in:
smoogipooo 2017-04-18 10:09:36 +09:00
commit d5c5b7eb6b
3 changed files with 13 additions and 6 deletions

View File

@ -271,12 +271,14 @@ namespace osu.Game.Database
{
var beatmapSetInfo = Query<BeatmapSetInfo>().FirstOrDefault(s => s.ID == beatmapInfo.BeatmapSetInfoID);
//we need metadata
GetChildren(beatmapSetInfo);
if (beatmapSetInfo == null)
throw new InvalidOperationException($@"Beatmap set {beatmapInfo.BeatmapSetInfoID} is not in the local database.");
//we need metadata
GetChildren(beatmapSetInfo);
foreach (var b in beatmapSetInfo.Beatmaps)
GetChildren(b);
if (beatmapInfo.Metadata == null)
beatmapInfo.Metadata = beatmapSetInfo.Metadata;

View File

@ -145,7 +145,7 @@ namespace osu.Game.Screens.Select
}
}
int startIndex = groups.IndexOf(selectedGroup);
int startIndex = Math.Max(0, groups.IndexOf(selectedGroup));
int index = startIndex;
do
@ -221,7 +221,12 @@ namespace osu.Game.Screens.Select
private BeatmapGroup createGroup(BeatmapSetInfo beatmapSet)
{
database.GetChildren(beatmapSet);
beatmapSet.Beatmaps.ForEach(b => { if (b.Metadata == null) b.Metadata = beatmapSet.Metadata; });
beatmapSet.Beatmaps.ForEach(b =>
{
database.GetChildren(b);
if (b.Metadata == null)
b.Metadata = beatmapSet.Metadata;
});
return new BeatmapGroup(beatmapSet, database)
{

View File

@ -23,7 +23,7 @@ namespace osu.Game.Screens.Select
{
var set = g.BeatmapSet;
bool hasCurrentMode = set.Beatmaps.Any(bm => bm.Ruleset == Ruleset);
bool hasCurrentMode = set.Beatmaps.Any(bm => bm.RulesetID == Ruleset.ID);
bool match = hasCurrentMode;