From 21c0882b74d3267361ff2c9b55cf00b7408435e6 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Mon, 15 Nov 2021 17:24:53 +0900 Subject: [PATCH] Don't serialize FL rating without FL mod --- osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs index 0d76cb855b..089f163dfb 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyAttributes.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; +using JetBrains.Annotations; using Newtonsoft.Json; using osu.Game.Rulesets.Difficulty; using osu.Game.Rulesets.Mods; @@ -74,5 +75,8 @@ public override void FromDatabase(IReadOnlyDictionary values, int h HitCircleCount = hitCircleCount; SpinnerCount = spinnerCount; } + + [UsedImplicitly] + public bool ShouldSerializeFlashlightRating() => Mods.OfType().Any(); } }