From 623d6d6d2d0635b55da3d99d499b0ef5a085b618 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 3 Jan 2022 12:46:20 +0900 Subject: [PATCH] Add migration of positional hitsounds setting to new level based setting --- osu.Game/Configuration/OsuConfigManager.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 6efbaa4d36..07d2026c65 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -98,6 +98,7 @@ protected override void InitialiseDefaults() SetDefault(OsuSetting.MenuParallax, true); // Gameplay + SetDefault(OsuSetting.PositionalHitsounds, true); // replaced by level setting below, can be removed 20220703. SetDefault(OsuSetting.PositionalHitsoundsLevel, 0.2f, 0, 1); SetDefault(OsuSetting.DimLevel, 0.8, 0, 1, 0.01); SetDefault(OsuSetting.BlurLevel, 0, 0, 1, 0.01); @@ -174,6 +175,13 @@ public void Migrate() if (!int.TryParse(pieces[1], out int monthDay)) return; int combined = (year * 10000) + monthDay; + + if (combined < 20220103) + { + var positionalHitsoundsEnabled = GetBindable(OsuSetting.PositionalHitsounds); + if (!positionalHitsoundsEnabled.Value) + SetValue(OsuSetting.PositionalHitsoundsLevel, 0); + } } public override TrackedSettings CreateTrackedSettings() @@ -250,8 +258,9 @@ public enum OsuSetting BlurLevel, LightenDuringBreaks, ShowStoryboard, - PositionalHitsoundsLevel, KeyOverlay, + PositionalHitsounds, + PositionalHitsoundsLevel, AlwaysPlayFirstComboBreak, FloatingComments, HUDVisibilityMode,