Choose a better beatmap if the intro is still playing

Also skip intro time.
This commit is contained in:
Dean Herbert 2023-11-24 17:34:08 +09:00
parent 95229cb336
commit 7153c823e8
No known key found for this signature in database

View File

@ -52,12 +52,18 @@ namespace osu.Game.Overlays.SkinEditor
[Resolved]
private OsuGame game { get; set; } = null!;
[Resolved]
private MusicController music { get; set; } = null!;
[Resolved]
private IBindable<RulesetInfo> ruleset { get; set; } = null!;
[Resolved]
private Bindable<IReadOnlyList<Mod>> mods { get; set; } = null!;
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; } = null!;
private OsuScreen? lastTargetScreen;
private Vector2 lastDrawSize;
@ -133,6 +139,14 @@ namespace osu.Game.Overlays.SkinEditor
{
performer?.PerformFromScreen(screen =>
{
// If we're playing the intro, switch away to another beatmap.
if (beatmap.Value.BeatmapSetInfo.Protected)
{
music.NextTrack();
Schedule(PresentGameplay);
return;
}
if (screen is Player)
return;
@ -275,6 +289,7 @@ namespace osu.Game.Overlays.SkinEditor
: base(createScore, new PlayerConfiguration
{
ShowResults = false,
AutomaticallySkipIntro = true,
})
{
}