mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:07:52 +08:00
Do not attempt to recalculate non-legacy scores or scores set on custom rulesets
Addresses discussions such as https://github.com/ppy/osu/discussions/26407 or https://github.com/ppy/osu/discussions/25914 wherein: - the game would attempt to convert scores for custom rulesets, which makes no sense, especially so when they're not there, - the game would also "recalculate" lazer scores, but that was never the intention or was never supported; the game would just increment the score version on those but still include them in the converted tally.
This commit is contained in:
parent
388f6599e0
commit
4f7dcb3a50
@ -13,6 +13,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Extensions;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
@ -28,7 +29,7 @@ namespace osu.Game
|
||||
/// </summary>
|
||||
public partial class BackgroundDataStoreProcessor : Component
|
||||
{
|
||||
protected Task ProcessingTask = null!;
|
||||
protected Task ProcessingTask { get; private set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private RulesetStore rulesetStore { get; set; } = null!;
|
||||
@ -316,10 +317,17 @@ namespace osu.Game
|
||||
{
|
||||
Logger.Log("Querying for scores that need total score conversion...");
|
||||
|
||||
HashSet<Guid> scoreIds = realmAccess.Run(r => new HashSet<Guid>(r.All<ScoreInfo>()
|
||||
.Where(s => !s.BackgroundReprocessingFailed && s.BeatmapInfo != null
|
||||
HashSet<Guid> scoreIds = realmAccess.Run(r => new HashSet<Guid>(
|
||||
r.All<ScoreInfo>()
|
||||
.Where(s => !s.BackgroundReprocessingFailed
|
||||
&& s.BeatmapInfo != null
|
||||
&& s.IsLegacyScore
|
||||
&& s.TotalScoreVersion < LegacyScoreEncoder.LATEST_VERSION)
|
||||
.AsEnumerable().Select(s => s.ID)));
|
||||
.AsEnumerable()
|
||||
// must be done after materialisation, as realm doesn't want to support
|
||||
// nested property predicates
|
||||
.Where(s => s.Ruleset.IsLegacyRuleset())
|
||||
.Select(s => s.ID)));
|
||||
|
||||
Logger.Log($"Found {scoreIds.Count} scores which require total score conversion.");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user