Merge branch 'master' into fix-disabled-set-crash

This commit is contained in:
Dan Balasescu
2019-03-05 17:25:13 +09:00
committed by GitHub
372 changed files with 3325 additions and 1072 deletions

View File

@ -58,6 +58,7 @@ namespace osu.Game.Screens.Multi.Match.Components
{
if (!enabled.Value)
return true;
return base.OnClick(e);
}
}

View File

@ -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();

View File

@ -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;

View File

@ -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)
{