mirror of https://github.com/ppy/osu
Restore ruleset using current playlist item on resuming room sub screen
Ensures that the ruleset selected at the multiplayer song selection screen does not overwrite the current playlist item's ruleset.
This commit is contained in:
parent
446962446e
commit
c5ac996e3f
|
@ -300,6 +300,7 @@ public override void OnResuming(IScreen last)
|
|||
updateWorkingBeatmap();
|
||||
beginHandlingTrack();
|
||||
Scheduler.AddOnce(UpdateMods);
|
||||
Scheduler.AddOnce(updateRuleset);
|
||||
}
|
||||
|
||||
public override bool OnExiting(IScreen next)
|
||||
|
@ -353,8 +354,7 @@ private void selectedItemChanged()
|
|||
.ToList();
|
||||
|
||||
UpdateMods();
|
||||
|
||||
Ruleset.Value = rulesets.GetRuleset(selected.RulesetID);
|
||||
updateRuleset();
|
||||
|
||||
if (!selected.AllowedMods.Any())
|
||||
{
|
||||
|
@ -387,6 +387,14 @@ protected virtual void UpdateMods()
|
|||
Mods.Value = UserMods.Value.Concat(SelectedItem.Value.RequiredMods).ToList();
|
||||
}
|
||||
|
||||
private void updateRuleset()
|
||||
{
|
||||
if (SelectedItem.Value == null || !this.IsCurrentScreen())
|
||||
return;
|
||||
|
||||
Ruleset.Value = rulesets.GetRuleset(SelectedItem.Value.RulesetID);
|
||||
}
|
||||
|
||||
private void beginHandlingTrack()
|
||||
{
|
||||
Beatmap.BindValueChanged(applyLoopingToTrack, true);
|
||||
|
|
Loading…
Reference in New Issue