Skip to content

Commit

Permalink
Add the classic stage info into the test case for let the editor works.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Jan 18, 2023
1 parent 29464af commit 795a490
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using osu.Game.Overlays;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Karaoke.Beatmaps;
using osu.Game.Rulesets.Karaoke.Beatmaps.Stages.Classic;
using osu.Game.Rulesets.Karaoke.Screens.Edit.Stages.Classic;
using osu.Game.Rulesets.Karaoke.Tests.Beatmaps;
using osu.Game.Screens.Edit;
Expand Down Expand Up @@ -49,6 +50,9 @@ protected virtual KaraokeBeatmap CreateBeatmap()
if (new KaraokeBeatmapConverter(beatmap, new KaraokeRuleset()).Convert() is not KaraokeBeatmap karaokeBeatmap)
throw new ArgumentNullException(nameof(karaokeBeatmap));

// add classic stage info for testing purpose.
karaokeBeatmap.StageInfos.Add(new ClassicStageInfo());

return karaokeBeatmap;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using osu.Game.Overlays;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Karaoke.Beatmaps;
using osu.Game.Rulesets.Karaoke.Beatmaps.Stages.Classic;
using osu.Game.Rulesets.Karaoke.Screens.Edit.Stages.Classic;
using osu.Game.Rulesets.Karaoke.Tests.Beatmaps;
using osu.Game.Screens.Edit;
Expand All @@ -29,6 +30,10 @@ public TestSceneClassicStageEditor()
{
var beatmap = new TestKaraokeBeatmap(new KaraokeRuleset().RulesetInfo);
var karaokeBeatmap = new KaraokeBeatmapConverter(beatmap, new KaraokeRuleset()).Convert() as KaraokeBeatmap;

// add classic stage info for testing purpose.
karaokeBeatmap!.StageInfos.Add(new ClassicStageInfo());

editorBeatmap = new EditorBeatmap(karaokeBeatmap);
}

Expand Down

0 comments on commit 795a490

Please sign in to comment.