1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-14 00:03:18 +08:00

Compare commits

...

1 Commits

7 changed files with 6 additions and 34 deletions
@@ -265,9 +265,8 @@ namespace osu.Game.Online.Multiplayer
/// <param name="matchType">The type of the match, if any.</param>
/// <param name="queueMode">The new queue mode, if any.</param>
/// <param name="autoStartDuration">The new auto-start countdown duration, if any.</param>
/// <param name="autoSkip">The new auto-skip setting.</param>
public Task ChangeSettings(Optional<string> name = default, Optional<string> password = default, Optional<MatchType> matchType = default, Optional<QueueMode> queueMode = default,
Optional<TimeSpan> autoStartDuration = default, Optional<bool> autoSkip = default)
Optional<TimeSpan> autoStartDuration = default)
{
if (Room == null)
throw new InvalidOperationException("Must be joined to a match to change settings.");
@@ -279,7 +278,6 @@ namespace osu.Game.Online.Multiplayer
MatchType = matchType.GetOr(Room.Settings.MatchType),
QueueMode = queueMode.GetOr(Room.Settings.QueueMode),
AutoStartDuration = autoStartDuration.GetOr(Room.Settings.AutoStartDuration),
AutoSkip = autoSkip.GetOr(Room.Settings.AutoSkip)
});
}
@@ -741,7 +739,6 @@ namespace osu.Game.Online.Multiplayer
APIRoom.QueueMode.Value = Room.Settings.QueueMode;
APIRoom.AutoStartDuration.Value = Room.Settings.AutoStartDuration;
APIRoom.CurrentPlaylistItem.Value = APIRoom.Playlist.Single(item => item.ID == settings.PlaylistItemId);
APIRoom.AutoSkip.Value = Room.Settings.AutoSkip;
RoomUpdated?.Invoke();
}
@@ -29,9 +29,6 @@ namespace osu.Game.Online.Multiplayer
[Key(5)]
public TimeSpan AutoStartDuration { get; set; }
[Key(6)]
public bool AutoSkip { get; set; }
[IgnoreMember]
public bool AutoStartEnabled => AutoStartDuration != TimeSpan.Zero;
@@ -45,8 +42,7 @@ namespace osu.Game.Online.Multiplayer
&& PlaylistItemId == other.PlaylistItemId
&& MatchType == other.MatchType
&& QueueMode == other.QueueMode
&& AutoStartDuration == other.AutoStartDuration
&& AutoSkip == other.AutoSkip;
&& AutoStartDuration == other.AutoStartDuration;
}
public override string ToString() => $"Name:{Name}"
@@ -54,7 +50,6 @@ namespace osu.Game.Online.Multiplayer
+ $" Type:{MatchType}"
+ $" Item:{PlaylistItemId}"
+ $" Queue:{QueueMode}"
+ $" Start:{AutoStartDuration}"
+ $" AutoSkip:{AutoSkip}";
+ $" Start:{AutoStartDuration}";
}
}
-5
View File
@@ -159,10 +159,6 @@ namespace osu.Game.Online.Rooms
set => MaxAttempts.Value = value;
}
[Cached]
[JsonProperty("auto_skip")]
public readonly Bindable<bool> AutoSkip = new Bindable<bool>();
public Room()
{
Password.BindValueChanged(p => HasPassword.Value = !string.IsNullOrEmpty(p.NewValue));
@@ -199,7 +195,6 @@ namespace osu.Game.Online.Rooms
DifficultyRange.Value = other.DifficultyRange.Value;
PlaylistItemStats.Value = other.PlaylistItemStats.Value;
CurrentPlaylistItem.Value = other.CurrentPlaylistItem.Value;
AutoSkip.Value = other.AutoSkip.Value;
if (EndDate.Value != null && DateTimeOffset.Now >= EndDate.Value)
Status.Value = new RoomStatusEnded();
@@ -63,7 +63,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
public MatchTypePicker TypePicker;
public OsuEnumDropdown<QueueMode> QueueModeDropdown;
public OsuTextBox PasswordTextBox;
public OsuCheckbox AutoSkipCheckbox;
public TriangleButton ApplyButton;
public OsuSpriteText ErrorText;
@@ -250,13 +249,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
LengthLimit = 255,
},
},
new Section("Other")
{
Child = AutoSkipCheckbox = new OsuCheckbox
{
LabelText = "Automatically skip the beatmap intro"
}
}
}
}
},
@@ -351,7 +343,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
Password.BindValueChanged(password => PasswordTextBox.Text = password.NewValue ?? string.Empty, true);
QueueMode.BindValueChanged(mode => QueueModeDropdown.Current.Value = mode.NewValue, true);
AutoStartDuration.BindValueChanged(duration => startModeDropdown.Current.Value = (StartMode)(int)duration.NewValue.TotalSeconds, true);
AutoSkip.BindValueChanged(autoSkip => AutoSkipCheckbox.Current.Value = autoSkip.NewValue, true);
operationInProgress.BindTo(ongoingOperationTracker.InProgress);
operationInProgress.BindValueChanged(v =>
@@ -399,8 +390,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
password: PasswordTextBox.Text,
matchType: TypePicker.Current.Value,
queueMode: QueueModeDropdown.Current.Value,
autoStartDuration: autoStartDuration,
autoSkip: AutoSkipCheckbox.Current.Value)
autoStartDuration: autoStartDuration)
.ContinueWith(t => Schedule(() =>
{
if (t.IsCompletedSuccessfully)
@@ -416,7 +406,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
room.Password.Value = PasswordTextBox.Current.Value;
room.QueueMode.Value = QueueModeDropdown.Current.Value;
room.AutoStartDuration.Value = autoStartDuration;
room.AutoSkip.Value = AutoSkipCheckbox.Current.Value;
if (int.TryParse(MaxParticipantsField.Text, out int max))
room.MaxParticipants.Value = max;
@@ -61,8 +61,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
{
AllowPause = false,
AllowRestart = false,
AllowSkipping = room.AutoSkip.Value,
AutomaticallySkipIntro = room.AutoSkip.Value
AllowSkipping = false,
})
{
this.users = users;
@@ -86,9 +86,6 @@ namespace osu.Game.Screens.OnlinePlay
[Resolved(typeof(Room))]
protected Bindable<TimeSpan> AutoStartDuration { get; private set; }
[Resolved(typeof(Room))]
protected Bindable<bool> AutoSkip { get; private set; }
[Resolved(CanBeNull = true)]
private IBindable<PlaylistItem> subScreenSelectedItem { get; set; }
+1 -1
View File
@@ -363,7 +363,7 @@ namespace osu.Game.Screens.Play
return;
CurrentPlayer = createPlayer();
CurrentPlayer.Configuration.AutomaticallySkipIntro |= quickRestart;
CurrentPlayer.Configuration.AutomaticallySkipIntro = quickRestart;
CurrentPlayer.RestartCount = restartCount++;
CurrentPlayer.RestartRequested = restartRequested;