mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Directly bypass beatmap/ruleset restrictions
This commit is contained in:
@ -32,10 +32,9 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
private readonly Bindable<IEnumerable<User>> participantsBind = new Bindable<IEnumerable<User>>();
|
private readonly Bindable<IEnumerable<User>> participantsBind = new Bindable<IEnumerable<User>>();
|
||||||
private readonly BindableCollection<PlaylistItem> playlistBind = new BindableCollection<PlaylistItem>();
|
private readonly BindableCollection<PlaylistItem> playlistBind = new BindableCollection<PlaylistItem>();
|
||||||
|
|
||||||
protected override Drawable TransitionContent => participants;
|
public override bool AllowBeatmapRulesetChange => false;
|
||||||
|
|
||||||
public override bool AllowBeatmapRulesetChange => allowBeatmapRulesetChange;
|
protected override Drawable TransitionContent => participants;
|
||||||
private bool allowBeatmapRulesetChange;
|
|
||||||
|
|
||||||
public override string Title => room.Name.Value;
|
public override string Title => room.Name.Value;
|
||||||
|
|
||||||
@ -164,19 +163,21 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
info.Beatmap.Value = item.Beatmap;
|
info.Beatmap.Value = item.Beatmap;
|
||||||
info.Mods.Value = item.RequiredMods;
|
info.Mods.Value = item.RequiredMods;
|
||||||
|
|
||||||
allowBeatmapRulesetChange = true;
|
|
||||||
|
|
||||||
// Todo: item.Beatmap can be null here...
|
// Todo: item.Beatmap can be null here...
|
||||||
var localBeatmap = beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == item.BeatmapID) ?? item.Beatmap;
|
var localBeatmap = beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == item.BeatmapID) ?? item.Beatmap;
|
||||||
|
|
||||||
Schedule(() =>
|
// Bypass any beatmap and ruleset restrictions
|
||||||
{
|
var beatmapDisabled = Beatmap.Disabled;
|
||||||
Beatmap.Value = beatmapManager.GetWorkingBeatmap(localBeatmap);
|
var rulesetDisabled = Ruleset.Disabled;
|
||||||
Beatmap.Value.Mods.Value = item.RequiredMods.ToArray();
|
Beatmap.Disabled = false;
|
||||||
Ruleset.Value = item.Ruleset;
|
Ruleset.Disabled = false;
|
||||||
|
|
||||||
allowBeatmapRulesetChange = false;
|
Beatmap.Value = beatmapManager.GetWorkingBeatmap(localBeatmap);
|
||||||
});
|
Beatmap.Value.Mods.Value = item.RequiredMods.ToArray();
|
||||||
|
Ruleset.Value = item.Ruleset;
|
||||||
|
|
||||||
|
Beatmap.Disabled = beatmapDisabled;
|
||||||
|
Ruleset.Disabled = rulesetDisabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onStart()
|
private void onStart()
|
||||||
|
Reference in New Issue
Block a user