Skip to content

Commit

Permalink
Remove read stage ingo from the beatmap.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Nov 30, 2024
1 parent ace95e6 commit d1cc4f8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Game.Rulesets.Karaoke.Beatmaps;
using osu.Game.Rulesets.Karaoke.Screens.Edit.Stages.Classic;
using osu.Game.Rulesets.Karaoke.Stages.Infos.Classic;

namespace osu.Game.Rulesets.Karaoke.Tests.Screens.Edit.Stages.Classic;

public abstract partial class ClassicStageScreenTestScene<T> : GenericEditorScreenTestScene<T, ClassicStageEditorScreenMode>
where T : ClassicStageScreen
{
protected override KaraokeBeatmap CreateBeatmap()
{
var karaokeBeatmap = base.CreateBeatmap();

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

return karaokeBeatmap;
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Game.Rulesets.Karaoke.Beatmaps;
using osu.Game.Rulesets.Karaoke.Screens.Edit.Stages.Classic;
using osu.Game.Rulesets.Karaoke.Stages.Infos.Classic;

namespace osu.Game.Rulesets.Karaoke.Tests.Screens.Edit.Stages.Classic;

public partial class TestSceneClassicStageEditor : GenericEditorTestScene<ClassicStageEditor, ClassicStageEditorScreenMode>
{
protected override KaraokeBeatmap CreateBeatmap()
{
var karaokeBeatmap = base.CreateBeatmap();

// 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 @@ -8,6 +8,7 @@

namespace osu.Game.Rulesets.Karaoke.Tests.Screens.Edit.Stages.Classic;

[Ignore("Ingore this test until able to edit the stage.")]
public partial class TestSceneStageScreen : ClassicStageScreenTestScene<StageScreen>
{
protected override StageScreen CreateEditorScreen() => new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,12 @@ public partial class StageScreen : ClassicStageScreen, IStageEditorStateProvider
[Cached(typeof(IStageEditorVerifier))]
private readonly StageEditorVerifier stageEditorVerifier;

[Resolved]
private EditorBeatmap editorBeatmap { get; set; } = null!;

public ClassicStageInfo StageInfo
{
get
{
// we should make sure that current stage info is classic stage info.
// otherwise, we might not able to see the edit result in the editor.
var currentStageInfo = EditorBeatmapUtils.GetPlayableBeatmap(editorBeatmap).CurrentStageInfo;
if (currentStageInfo is not ClassicStageInfo classicStageInfo)
throw new NotSupportedException();

return classicStageInfo;
// todo: should be able to read the stage info from the beatmap.
throw new NotImplementedException();
}
}

Expand Down

0 comments on commit d1cc4f8

Please sign in to comment.