From 55307365418b520bc566ff0f7b28d5a8b908026b Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 30 Nov 2018 14:24:10 +0900 Subject: [PATCH] Cleanup mods string --- osu.Game/Scoring/ScoreInfo.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/osu.Game/Scoring/ScoreInfo.cs b/osu.Game/Scoring/ScoreInfo.cs index 1cc8e53574..54284fa24b 100644 --- a/osu.Game/Scoring/ScoreInfo.cs +++ b/osu.Game/Scoring/ScoreInfo.cs @@ -43,23 +43,16 @@ namespace osu.Game.Scoring { get { - if (modsString == null) + if (ModsString == null) return Array.Empty(); - var deserialized = JsonConvert.DeserializeObject(modsString); + var deserialized = JsonConvert.DeserializeObject(ModsString); return Ruleset.CreateInstance().GetAllMods().Where(mod => deserialized.Any(d => d == mod.ShortenedName)).ToArray(); } - set => modsString = JsonConvert.SerializeObject(value.Select(m => m.ShortenedName).ToArray()); + set => ModsString = JsonConvert.SerializeObject(value.Select(m => m.ShortenedName).ToArray()); } - [NotMapped, JsonIgnore] - private string modsString; - - public string ModsString - { - get => modsString; - set => modsString = value; - } + public string ModsString { get; set; } [NotMapped, JsonIgnore] public User User;