Make BeatmapInfo expose Ruleset instead of PlayMode.

This commit is contained in:
smoogipooo
2017-04-15 05:01:36 +09:00
parent 59bfc7abad
commit a89af273be
8 changed files with 14 additions and 12 deletions

View File

@ -6,7 +6,6 @@ using osu.Desktop.VisualTests.Platform;
using osu.Framework.Testing;
using osu.Framework.MathUtils;
using osu.Game.Database;
using osu.Game.Modes;
using osu.Game.Screens.Select;
using osu.Game.Screens.Select.Filter;
@ -72,7 +71,7 @@ namespace osu.Desktop.VisualTests.Tests
new BeatmapInfo
{
OnlineBeatmapID = 1234 + i,
Mode = PlayMode.Osu,
Mode = 0,
Path = "normal.osu",
Version = "Normal",
Difficulty = new BeatmapDifficulty
@ -83,7 +82,7 @@ namespace osu.Desktop.VisualTests.Tests
new BeatmapInfo
{
OnlineBeatmapID = 1235 + i,
Mode = PlayMode.Osu,
Mode = 0,
Path = "hard.osu",
Version = "Hard",
Difficulty = new BeatmapDifficulty
@ -94,7 +93,7 @@ namespace osu.Desktop.VisualTests.Tests
new BeatmapInfo
{
OnlineBeatmapID = 1236 + i,
Mode = PlayMode.Osu,
Mode = 0,
Path = "insane.osu",
Version = "Insane",
Difficulty = new BeatmapDifficulty

View File

@ -9,12 +9,12 @@ using osu.Game.Beatmaps;
using OpenTK;
using osu.Framework.Graphics.Sprites;
using osu.Game.Database;
using osu.Game.Modes;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Screens.Play;
using OpenTK.Graphics;
using osu.Desktop.VisualTests.Beatmaps;
using osu.Game.Modes.Osu;
namespace osu.Desktop.VisualTests.Tests
{
@ -37,7 +37,7 @@ namespace osu.Desktop.VisualTests.Tests
WorkingBeatmap beatmap = null;
var beatmapInfo = db.Query<BeatmapInfo>().FirstOrDefault(b => b.Mode == PlayMode.Osu);
var beatmapInfo = db.Query<BeatmapInfo>().FirstOrDefault(b => b.Ruleset is OsuRuleset);
if (beatmapInfo != null)
beatmap = db.GetWorkingBeatmap(beatmapInfo);