mirror of https://github.com/ppy/osu
Add migration of positional hitsounds setting to new level based setting
This commit is contained in:
parent
5dd024aab7
commit
623d6d6d2d
|
@ -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<bool>(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,
|
||||
|
|
Loading…
Reference in New Issue