mirror of
https://github.com/osukey/osukey.git
synced 2025-05-20 04:57:38 +09:00
Change default value of StarRating
to -1
This commit is contained in:
parent
04f48d8862
commit
d5e0dba9da
@ -71,7 +71,7 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
if (b.Ruleset.ShortName == ruleset.ShortName)
|
if (b.Ruleset.ShortName == ruleset.ShortName)
|
||||||
{
|
{
|
||||||
b.StarRating = 0;
|
b.StarRating = -1;
|
||||||
countReset++;
|
countReset++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
realmAccess.Run(r =>
|
realmAccess.Run(r =>
|
||||||
{
|
{
|
||||||
foreach (var b in r.All<BeatmapInfo>().Where(b => b.StarRating == 0 || (b.OnlineID > 0 && b.LastOnlineUpdate == null)))
|
foreach (var b in r.All<BeatmapInfo>().Where(b => b.StarRating < 0 || (b.OnlineID > 0 && b.LastOnlineUpdate == null)))
|
||||||
{
|
{
|
||||||
Debug.Assert(b.BeatmapSet != null);
|
Debug.Assert(b.BeatmapSet != null);
|
||||||
beatmapSetIds.Add(b.BeatmapSet.ID);
|
beatmapSetIds.Add(b.BeatmapSet.ID);
|
||||||
|
@ -87,7 +87,11 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
public string Hash { get; set; } = string.Empty;
|
public string Hash { get; set; } = string.Empty;
|
||||||
|
|
||||||
public double StarRating { get; set; }
|
/// <summary>
|
||||||
|
/// Defaults to -1 (meaning not-yet-calculated).
|
||||||
|
/// Will likely be superseded with a better storage considering ruleset/mods.
|
||||||
|
/// </summary>
|
||||||
|
public double StarRating { get; set; } = -1;
|
||||||
|
|
||||||
[Indexed]
|
[Indexed]
|
||||||
public string MD5Hash { get; set; } = string.Empty;
|
public string MD5Hash { get; set; } = string.Empty;
|
||||||
|
@ -63,7 +63,7 @@ namespace osu.Game.Database
|
|||||||
/// 17 2022-07-16 Added CountryCode to RealmUser.
|
/// 17 2022-07-16 Added CountryCode to RealmUser.
|
||||||
/// 18 2022-07-19 Added OnlineMD5Hash and LastOnlineUpdate to BeatmapInfo.
|
/// 18 2022-07-19 Added OnlineMD5Hash and LastOnlineUpdate to BeatmapInfo.
|
||||||
/// 19 2022-07-19 Added DateSubmitted and DateRanked to BeatmapSetInfo.
|
/// 19 2022-07-19 Added DateSubmitted and DateRanked to BeatmapSetInfo.
|
||||||
/// 20 2022-07-21 Added LastAppliedDifficultyVersion to RulesetInfo.
|
/// 20 2022-07-21 Added LastAppliedDifficultyVersion to RulesetInfo, changed default value of BeatmapInfo.StarRating to -1.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const int schema_version = 20;
|
private const int schema_version = 20;
|
||||||
|
|
||||||
@ -781,6 +781,16 @@ namespace osu.Game.Database
|
|||||||
case 14:
|
case 14:
|
||||||
foreach (var beatmap in migration.NewRealm.All<BeatmapInfo>())
|
foreach (var beatmap in migration.NewRealm.All<BeatmapInfo>())
|
||||||
beatmap.UserSettings = new BeatmapUserSettings();
|
beatmap.UserSettings = new BeatmapUserSettings();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 20:
|
||||||
|
foreach (var beatmap in migration.NewRealm.All<BeatmapInfo>())
|
||||||
|
{
|
||||||
|
if (beatmap.StarRating == 0)
|
||||||
|
beatmap.StarRating = -1;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user