mirror of
https://github.com/ppy/osu
synced 2025-01-05 21:59:46 +00:00
Fix restoration of enabled mods when cancelling song select
This commit is contained in:
parent
cf2feec7df
commit
6e821a426d
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
@ -9,6 +10,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Screens.Multi;
|
||||
|
||||
namespace osu.Game.Screens.Select
|
||||
@ -23,6 +25,9 @@ namespace osu.Game.Screens.Select
|
||||
[Resolved(typeof(Room))]
|
||||
protected Bindable<PlaylistItem> CurrentItem { get; private set; }
|
||||
|
||||
[Resolved]
|
||||
protected Bindable<IEnumerable<Mod>> CurrentMods { get; private set; }
|
||||
|
||||
[Resolved]
|
||||
private BeatmapManager beatmaps { get; set; }
|
||||
|
||||
@ -56,9 +61,8 @@ namespace osu.Game.Screens.Select
|
||||
return true;
|
||||
|
||||
Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value?.Beatmap);
|
||||
Beatmap.Value.Mods.Value = CurrentMods.Value = CurrentItem.Value?.RequiredMods;
|
||||
Ruleset.Value = CurrentItem.Value?.Ruleset;
|
||||
CurrentItem.Value?.RequiredMods.Clear();
|
||||
CurrentItem.Value?.RequiredMods.AddRange(SelectedMods.Value);
|
||||
|
||||
Beatmap.Disabled = true;
|
||||
Ruleset.Disabled = true;
|
||||
|
Loading…
Reference in New Issue
Block a user