From b9298325a3168f191289a278af4061814ecf6a67 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 13 Dec 2017 18:10:32 +0900 Subject: [PATCH] Rename weird config setting --- osu.Game/Configuration/OsuConfigManager.cs | 4 +-- ...RandomType.cs => RandomSelectAlgorithm.cs} | 30 +++++++++---------- .../Sections/Gameplay/SongSelectSettings.cs | 6 ++-- osu.Game/Screens/Select/BeatmapCarousel.cs | 6 ++-- osu.Game/osu.Game.csproj | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) rename osu.Game/Configuration/{SelectionRandomType.cs => RandomSelectAlgorithm.cs} (87%) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 1f7808dceb..f4c7bdb586 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -20,7 +20,7 @@ protected override void InitialiseDefaults() Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1); Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10, 0.1); - Set(OsuSetting.SelectionRandomType, SongSelectRandomMode.RandomPermutation); + Set(OsuSetting.RandomSelectAlgorithm, RandomSelectAlgorithm.RandomPermutation); Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1); @@ -108,7 +108,7 @@ public enum OsuSetting SaveUsername, DisplayStarsMinimum, DisplayStarsMaximum, - SelectionRandomType, + RandomSelectAlgorithm, SnakingInSliders, SnakingOutSliders, ShowFpsDisplay, diff --git a/osu.Game/Configuration/SelectionRandomType.cs b/osu.Game/Configuration/RandomSelectAlgorithm.cs similarity index 87% rename from osu.Game/Configuration/SelectionRandomType.cs rename to osu.Game/Configuration/RandomSelectAlgorithm.cs index 4ff52fab37..9ed6b9357b 100644 --- a/osu.Game/Configuration/SelectionRandomType.cs +++ b/osu.Game/Configuration/RandomSelectAlgorithm.cs @@ -1,15 +1,15 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System.ComponentModel; - -namespace osu.Game.Configuration -{ - public enum SongSelectRandomMode - { - [Description("Never repeat")] - RandomPermutation, - [Description("Random")] - Random - } -} +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System.ComponentModel; + +namespace osu.Game.Configuration +{ + public enum RandomSelectAlgorithm + { + [Description("Never repeat")] + RandomPermutation, + [Description("Random")] + Random + } +} diff --git a/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs b/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs index 890c28aa07..03cd2118b9 100644 --- a/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs @@ -34,10 +34,10 @@ private void load(OsuConfigManager config) Bindable = config.GetBindable(OsuSetting.DisplayStarsMaximum), KeyboardStep = 1f }, - new SettingsEnumDropdown + new SettingsEnumDropdown { - LabelText = "Random beatmap selection", - Bindable = config.GetBindable(OsuSetting.SelectionRandomType), + LabelText = "Random selection algorithm", + Bindable = config.GetBindable(OsuSetting.RandomSelectAlgorithm), } }; } diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index c332f26c09..f61c8f60ef 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -71,7 +71,7 @@ public IEnumerable Beatmaps private readonly List carouselSets = new List(); - private Bindable randomType; + private Bindable randomSelectAlgorithm; private readonly List seenSets = new List(); private List items = new List(); @@ -221,7 +221,7 @@ public void SelectNextRandom() CarouselBeatmapSet group; - if (randomType == SongSelectRandomMode.RandomPermutation) + if (randomSelectAlgorithm == RandomSelectAlgorithm.RandomPermutation) { var notSeenGroups = visibleGroups.Except(seenSets); if (!notSeenGroups.Any()) @@ -338,7 +338,6 @@ private CarouselBeatmapSet createGroup(BeatmapSetInfo beatmapSet) [BackgroundDependencyLoader(permitNulls: true)] private void load(OsuConfigManager config) { - randomType = config.GetBindable(OsuSetting.SelectionRandomType); } private void addBeatmapSet(CarouselBeatmapSet set) @@ -350,6 +349,7 @@ private void addBeatmapSet(CarouselBeatmapSet set) //todo: add to root carouselSets.Add(set); + randomSelectAlgorithm = config.GetBindable(OsuSetting.RandomSelectAlgorithm); } private void removeBeatmapSet(CarouselBeatmapSet set) diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 54c41ead80..c190d988fa 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -343,7 +343,7 @@ - +