mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Merge branch 'master' into fix-disabled-set-crash
This commit is contained in:
@ -58,6 +58,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
{
|
||||
if (!enabled.Value)
|
||||
return true;
|
||||
|
||||
return base.OnClick(e);
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
private void load()
|
||||
{
|
||||
beatmaps.ItemAdded += beatmapAdded;
|
||||
beatmaps.ItemRemoved += beatmapRemoved;
|
||||
|
||||
Beatmap.BindValueChanged(b => updateBeatmap(b.NewValue), true);
|
||||
}
|
||||
@ -62,6 +63,15 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
Schedule(() => hasBeatmap = true);
|
||||
}
|
||||
|
||||
private void beatmapRemoved(BeatmapSetInfo model)
|
||||
{
|
||||
if (Beatmap.Value == null)
|
||||
return;
|
||||
|
||||
if (model.OnlineBeatmapSetID == Beatmap.Value.BeatmapSet.OnlineBeatmapSetID)
|
||||
Schedule(() => hasBeatmap = false);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
@ -39,7 +39,8 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
|
||||
private readonly Box hover, selection;
|
||||
|
||||
public RoomAvailabilityPickerItem(RoomAvailability value) : base(value)
|
||||
public RoomAvailabilityPickerItem(RoomAvailability value)
|
||||
: base(value)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
Width = 102;
|
||||
|
@ -43,7 +43,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
protected Bindable<PlaylistItem> CurrentItem { get; private set; }
|
||||
|
||||
[Resolved]
|
||||
protected Bindable<IEnumerable<Mod>> CurrentMods { get; private set; }
|
||||
protected Bindable<IEnumerable<Mod>> SelectedMods { get; private set; }
|
||||
|
||||
[Resolved]
|
||||
private BeatmapManager beatmapManager { get; set; }
|
||||
@ -194,7 +194,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
var localBeatmap = e.NewValue?.Beatmap == null ? null : beatmapManager.QueryBeatmap(b => b.OnlineBeatmapID == e.NewValue.Beatmap.OnlineBeatmapID);
|
||||
|
||||
Beatmap.Value = beatmapManager.GetWorkingBeatmap(localBeatmap);
|
||||
CurrentMods.Value = e.NewValue?.RequiredMods ?? Enumerable.Empty<Mod>();
|
||||
SelectedMods.Value = e.NewValue?.RequiredMods ?? Enumerable.Empty<Mod>();
|
||||
if (e.NewValue?.Ruleset != null)
|
||||
Ruleset.Value = e.NewValue.Ruleset;
|
||||
}
|
||||
@ -222,7 +222,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
|
||||
private void onStart()
|
||||
{
|
||||
Beatmap.Value.Mods.Value = CurrentMods.Value.ToArray();
|
||||
Beatmap.Value.Mods.Value = SelectedMods.Value.ToArray();
|
||||
|
||||
switch (type.Value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user