diff --git a/osu.Game/Online/Rooms/MultiplayerPlaylistItem.cs b/osu.Game/Online/Rooms/MultiplayerPlaylistItem.cs index 4dfb3b389d..b737cda4ba 100644 --- a/osu.Game/Online/Rooms/MultiplayerPlaylistItem.cs +++ b/osu.Game/Online/Rooms/MultiplayerPlaylistItem.cs @@ -60,7 +60,7 @@ namespace osu.Game.Online.Rooms /// Indicates whether participants in the room are able to pick their own choice of beatmap difficulty and ruleset. /// [Key(11)] - public bool FreeStyle { get; set; } + public bool Freestyle { get; set; } [SerializationConstructor] public MultiplayerPlaylistItem() diff --git a/osu.Game/Online/Rooms/PlaylistItem.cs b/osu.Game/Online/Rooms/PlaylistItem.cs index e8725b6792..817b42f503 100644 --- a/osu.Game/Online/Rooms/PlaylistItem.cs +++ b/osu.Game/Online/Rooms/PlaylistItem.cs @@ -71,7 +71,7 @@ namespace osu.Game.Online.Rooms /// Indicates whether participants in the room are able to pick their own choice of beatmap difficulty and ruleset. /// [JsonProperty("freestyle")] - public bool FreeStyle { get; set; } + public bool Freestyle { get; set; } /// /// A beatmap representing this playlist item. @@ -107,7 +107,7 @@ namespace osu.Game.Online.Rooms PlayedAt = item.PlayedAt; RequiredMods = item.RequiredMods.ToArray(); AllowedMods = item.AllowedMods.ToArray(); - FreeStyle = item.FreeStyle; + Freestyle = item.Freestyle; } public void MarkInvalid() => valid.Value = false; @@ -139,7 +139,7 @@ namespace osu.Game.Online.Rooms PlayedAt = PlayedAt, AllowedMods = AllowedMods, RequiredMods = RequiredMods, - FreeStyle = FreeStyle, + Freestyle = Freestyle, valid = { Value = Valid.Value }, }; } @@ -152,6 +152,6 @@ namespace osu.Game.Online.Rooms && PlaylistOrder == other.PlaylistOrder && AllowedMods.SequenceEqual(other.AllowedMods) && RequiredMods.SequenceEqual(other.RequiredMods) - && FreeStyle == other.FreeStyle; + && Freestyle == other.Freestyle; } } diff --git a/osu.Game/Screens/OnlinePlay/FooterButtonFreeStyle.cs b/osu.Game/Screens/OnlinePlay/FooterButtonFreestyle.cs similarity index 96% rename from osu.Game/Screens/OnlinePlay/FooterButtonFreeStyle.cs rename to osu.Game/Screens/OnlinePlay/FooterButtonFreestyle.cs index 0e22b3d3fb..157f90d078 100644 --- a/osu.Game/Screens/OnlinePlay/FooterButtonFreeStyle.cs +++ b/osu.Game/Screens/OnlinePlay/FooterButtonFreestyle.cs @@ -16,7 +16,7 @@ using osu.Game.Localisation; namespace osu.Game.Screens.OnlinePlay { - public partial class FooterButtonFreeStyle : FooterButton, IHasCurrentValue + public partial class FooterButtonFreestyle : FooterButton, IHasCurrentValue { private readonly BindableWithCurrent current = new BindableWithCurrent(); @@ -34,7 +34,7 @@ namespace osu.Game.Screens.OnlinePlay [Resolved] private OsuColour colours { get; set; } = null!; - public FooterButtonFreeStyle() + public FooterButtonFreestyle() { // Overwrite any external behaviour as we delegate the main toggle action to a sub-button. base.Action = () => current.Value = !current.Value; diff --git a/osu.Game/Screens/OnlinePlay/Lounge/Components/DrawableRoom.cs b/osu.Game/Screens/OnlinePlay/Lounge/Components/DrawableRoom.cs index 7bc0b612f1..a16267aa10 100644 --- a/osu.Game/Screens/OnlinePlay/Lounge/Components/DrawableRoom.cs +++ b/osu.Game/Screens/OnlinePlay/Lounge/Components/DrawableRoom.cs @@ -169,7 +169,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft }, - new FreeStyleStatusPill(Room) + new FreestyleStatusPill(Room) { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft diff --git a/osu.Game/Screens/OnlinePlay/Lounge/Components/FreeStyleStatusPill.cs b/osu.Game/Screens/OnlinePlay/Lounge/Components/FreestyleStatusPill.cs similarity index 84% rename from osu.Game/Screens/OnlinePlay/Lounge/Components/FreeStyleStatusPill.cs rename to osu.Game/Screens/OnlinePlay/Lounge/Components/FreestyleStatusPill.cs index 1c0135fb89..b306e27f84 100644 --- a/osu.Game/Screens/OnlinePlay/Lounge/Components/FreeStyleStatusPill.cs +++ b/osu.Game/Screens/OnlinePlay/Lounge/Components/FreestyleStatusPill.cs @@ -10,7 +10,7 @@ using osuTK.Graphics; namespace osu.Game.Screens.OnlinePlay.Lounge.Components { - public partial class FreeStyleStatusPill : OnlinePlayPill + public partial class FreestyleStatusPill : OnlinePlayPill { private readonly Room room; @@ -19,7 +19,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components protected override FontUsage Font => base.Font.With(weight: FontWeight.SemiBold); - public FreeStyleStatusPill(Room room) + public FreestyleStatusPill(Room room) { this.room = room; } @@ -35,7 +35,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components TextFlow.Colour = Color4.Black; room.PropertyChanged += onRoomPropertyChanged; - updateFreeStyleStatus(); + updateFreestyleStatus(); } private void onRoomPropertyChanged(object? sender, PropertyChangedEventArgs e) @@ -44,15 +44,15 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components { case nameof(Room.CurrentPlaylistItem): case nameof(Room.Playlist): - updateFreeStyleStatus(); + updateFreestyleStatus(); break; } } - private void updateFreeStyleStatus() + private void updateFreestyleStatus() { PlaylistItem? currentItem = room.Playlist.GetCurrentItem() ?? room.CurrentPlaylistItem; - Alpha = currentItem?.FreeStyle == true ? 1 : 0; + Alpha = currentItem?.Freestyle == true ? 1 : 0; } protected override void Dispose(bool isDisposing) diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index c9c9c3eca7..9f7e193131 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -450,11 +450,11 @@ namespace osu.Game.Screens.OnlinePlay.Match Ruleset.Value = GetGameplayRuleset(); bool freeMod = item.AllowedMods.Any(); - bool freeStyle = item.FreeStyle; + bool freestyle = item.Freestyle; // For now, the game can never be in a state where freemod and freestyle are on at the same time. // This will change, but due to the current implementation if this was to occur drawables will overlap so let's assert. - Debug.Assert(!freeMod || !freeStyle); + Debug.Assert(!freeMod || !freestyle); if (freeMod) { @@ -468,7 +468,7 @@ namespace osu.Game.Screens.OnlinePlay.Match UserModsSelectOverlay.IsValidMod = _ => false; } - if (freeStyle) + if (freestyle) { UserStyleSection.Show(); @@ -481,7 +481,7 @@ namespace osu.Game.Screens.OnlinePlay.Match UserStyleDisplayContainer.Child = new DrawableRoomPlaylistItem(gameplayItem, true) { AllowReordering = false, - AllowEditing = freeStyle, + AllowEditing = freestyle, RequestEdit = _ => OpenStyleSelection() }; } diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs index 5754bcb963..b42a58787d 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs @@ -87,7 +87,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer RulesetID = item.RulesetID, RequiredMods = item.RequiredMods.ToArray(), AllowedMods = item.AllowedMods.ToArray(), - FreeStyle = item.FreeStyle + Freestyle = item.Freestyle }; Task task = itemToEdit != null ? client.EditPlaylistItem(multiplayerItem) : client.AddPlaylistItem(multiplayerItem); diff --git a/osu.Game/Screens/OnlinePlay/OnlinePlaySongSelect.cs b/osu.Game/Screens/OnlinePlay/OnlinePlaySongSelect.cs index f6403c010e..8d1e3c3cb1 100644 --- a/osu.Game/Screens/OnlinePlay/OnlinePlaySongSelect.cs +++ b/osu.Game/Screens/OnlinePlay/OnlinePlaySongSelect.cs @@ -42,7 +42,7 @@ namespace osu.Game.Screens.OnlinePlay protected override UserActivity InitialActivity => new UserActivity.InLobby(room); protected readonly Bindable> FreeMods = new Bindable>(Array.Empty()); - protected readonly Bindable FreeStyle = new Bindable(); + protected readonly Bindable Freestyle = new Bindable(); private readonly Room room; private readonly PlaylistItem? initialItem; @@ -112,17 +112,17 @@ namespace osu.Game.Screens.OnlinePlay FreeMods.Value = initialItem.AllowedMods.Select(m => m.ToMod(rulesetInstance)).ToArray(); } - FreeStyle.Value = initialItem.FreeStyle; + Freestyle.Value = initialItem.Freestyle; } Mods.BindValueChanged(onModsChanged); Ruleset.BindValueChanged(onRulesetChanged); - FreeStyle.BindValueChanged(onFreeStyleChanged, true); + Freestyle.BindValueChanged(onFreestyleChanged, true); freeModSelectOverlayRegistration = OverlayManager?.RegisterBlockingOverlay(freeModSelect); } - private void onFreeStyleChanged(ValueChangedEvent enabled) + private void onFreestyleChanged(ValueChangedEvent enabled) { if (enabled.NewValue) { @@ -162,7 +162,7 @@ namespace osu.Game.Screens.OnlinePlay RulesetID = Ruleset.Value.OnlineID, RequiredMods = Mods.Value.Select(m => new APIMod(m)).ToArray(), AllowedMods = FreeMods.Value.Select(m => new APIMod(m)).ToArray(), - FreeStyle = FreeStyle.Value + Freestyle = Freestyle.Value }; return SelectItem(item); @@ -204,12 +204,12 @@ namespace osu.Game.Screens.OnlinePlay baseButtons.Single(i => i.button is FooterButtonMods).button.TooltipText = MultiplayerMatchStrings.RequiredModsButtonTooltip; freeModsFooterButton = new FooterButtonFreeMods(freeModSelect) { Current = FreeMods }; - var freeStyleButton = new FooterButtonFreeStyle { Current = FreeStyle }; + var freestyleButton = new FooterButtonFreestyle { Current = Freestyle }; baseButtons.InsertRange(baseButtons.FindIndex(b => b.button is FooterButtonMods) + 1, new (FooterButton, OverlayContainer?)[] { (freeModsFooterButton, null), - (freeStyleButton, null) + (freestyleButton, null) }); return baseButtons; diff --git a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs index abf80c0d44..84446ed0cf 100644 --- a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs +++ b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsSongSelect.cs @@ -40,7 +40,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists RulesetID = Ruleset.Value.OnlineID, RequiredMods = Mods.Value.Select(m => new APIMod(m)).ToArray(), AllowedMods = FreeMods.Value.Select(m => new APIMod(m)).ToArray(), - FreeStyle = FreeStyle.Value + Freestyle = Freestyle.Value }; } }