Only allow osu! mode maps to be played for now.

This commit is contained in:
Dean Herbert 2016-10-28 18:07:42 +09:00
parent 209f09df91
commit 0f5614ffa2
2 changed files with 14 additions and 3 deletions

View File

@ -107,7 +107,7 @@ namespace osu.Game.GameModes.Play
Colour = new Color4(238, 51, 153, 255),
Action = () => Push(new Player {
BeatmapInfo = selectedBeatmapGroup.SelectedPanel.Beatmap,
PlayMode = playMode.Value
PreferredPlayMode = playMode.Value
}),
},
}

View File

@ -24,7 +24,7 @@ namespace osu.Game.GameModes.Play
public BeatmapInfo BeatmapInfo;
public WorkingBeatmap Beatmap;
public PlayMode PlayMode;
public PlayMode PreferredPlayMode;
protected override IFrameBasedClock Clock => playerClock;
@ -80,7 +80,18 @@ namespace osu.Game.GameModes.Play
HitRenderer hitRenderer;
ScoreOverlay scoreOverlay;
switch (PlayMode)
if (Beatmap.Beatmap.BeatmapInfo?.Mode > PlayMode.Osu)
{
//we only support osu! mode for now because the hitobject parsing is crappy and needs a refactor.
Exit();
return;
}
PlayMode usablePlayMode = Beatmap.Beatmap.BeatmapInfo?.Mode > PlayMode.Osu ? Beatmap.Beatmap.BeatmapInfo.Mode : PreferredPlayMode;
switch (usablePlayMode)
{
default:
scoreOverlay = new ScoreOverlayOsu();