mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 00:47:24 +08:00
Fix song select max displayable star difficulty getting stuck at wrong maximum
This commit is contained in:
parent
e78c238ecd
commit
7229131d36
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Configuration.Tracking;
|
using osu.Framework.Configuration.Tracking;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
@ -126,6 +127,34 @@ namespace osu.Game.Configuration
|
|||||||
public OsuConfigManager(Storage storage)
|
public OsuConfigManager(Storage storage)
|
||||||
: base(storage)
|
: base(storage)
|
||||||
{
|
{
|
||||||
|
Migrate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Migrate()
|
||||||
|
{
|
||||||
|
// arrives as 2020.123.0
|
||||||
|
var rawVersion = Get<string>(OsuSetting.Version);
|
||||||
|
|
||||||
|
if (rawVersion.Length < 6)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var pieces = rawVersion.Split('.');
|
||||||
|
|
||||||
|
if (!int.TryParse(pieces[0], out int year)) return;
|
||||||
|
if (!int.TryParse(pieces[1], out int monthDay)) return;
|
||||||
|
if (!int.TryParse(pieces[2], out int minor)) return;
|
||||||
|
|
||||||
|
int combined = (year * 10000) + monthDay;
|
||||||
|
|
||||||
|
if (combined < 20200305)
|
||||||
|
{
|
||||||
|
// the maximum value of this setting was changed.
|
||||||
|
// if we don't manually increase this, it causes song select to filter out beatmaps the user expects to see.
|
||||||
|
var maxStars = (BindableDouble)GetOriginalBindable<double>(OsuSetting.DisplayStarsMaximum);
|
||||||
|
|
||||||
|
if (maxStars.Value == 10)
|
||||||
|
maxStars.Value = maxStars.MaxValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
||||||
|
Loading…
Reference in New Issue
Block a user