1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 07:17:18 +08:00

Merge pull request #32298 from smoogipoo/fix-initial-mp-settings

Fix initial multiplayer room settings not applied
This commit is contained in:
Dean Herbert 2025-03-09 22:11:01 +09:00 committed by GitHub
commit a2e7295658
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -365,8 +365,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
updateRoomMaxParticipants();
updateRoomAutoStartDuration();
updateRoomPlaylist();
drawablePlaylist.Items.BindCollectionChanged((_, __) => room.Playlist = drawablePlaylist.Items.ToArray());
}
private void onRoomPropertyChanged(object? sender, PropertyChangedEventArgs e)
@ -470,6 +468,14 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
}
else
{
room.Name = NameField.Text;
room.Password = PasswordTextBox.Text;
room.Type = TypePicker.Current.Value;
room.QueueMode = QueueModeDropdown.Current.Value;
room.AutoStartDuration = TimeSpan.FromSeconds((int)startModeDropdown.Current.Value);
room.AutoSkip = AutoSkipCheckbox.Current.Value;
room.Playlist = drawablePlaylist.Items.ToArray();
client.CreateRoom(room).ContinueWith(t => Schedule(() =>
{
if (t.IsCompletedSuccessfully)
@ -505,10 +511,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
const string not_found_prefix = "beatmaps not found:";
if (message.StartsWith(not_found_prefix, StringComparison.Ordinal))
{
ErrorText.Text = "The selected beatmap is not available online.";
room.Playlist.SingleOrDefault()?.MarkInvalid();
}
else
ErrorText.Text = message;