1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:45:09 +08:00

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] [Resolved]
private OsuGame game { get; set; } = null!; private OsuGame game { get; set; } = null!;
[Resolved]
private MusicController music { get; set; } = null!;
[Resolved] [Resolved]
private IBindable<RulesetInfo> ruleset { get; set; } = null!; private IBindable<RulesetInfo> ruleset { get; set; } = null!;
[Resolved] [Resolved]
private Bindable<IReadOnlyList<Mod>> mods { get; set; } = null!; private Bindable<IReadOnlyList<Mod>> mods { get; set; } = null!;
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; } = null!;
private OsuScreen? lastTargetScreen; private OsuScreen? lastTargetScreen;
private Vector2 lastDrawSize; private Vector2 lastDrawSize;
@ -133,6 +139,14 @@ namespace osu.Game.Overlays.SkinEditor
{ {
performer?.PerformFromScreen(screen => 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) if (screen is Player)
return; return;
@ -275,6 +289,7 @@ namespace osu.Game.Overlays.SkinEditor
: base(createScore, new PlayerConfiguration : base(createScore, new PlayerConfiguration
{ {
ShowResults = false, ShowResults = false,
AutomaticallySkipIntro = true,
}) })
{ {
} }