From 138e68c0650db24ccb30e0ca2a723d50f7a1379f Mon Sep 17 00:00:00 2001 From: Samuel Cattini-Schultz Date: Tue, 21 Nov 2023 17:52:27 +1100 Subject: [PATCH] Fix more missing properties in serialisation --- Difficalcy.Catch/Services/CatchCalculatorService.cs | 2 +- Difficalcy.Mania/Services/ManiaCalculatorService.cs | 2 +- Difficalcy.Osu/Services/OsuCalculatorService.cs | 4 +++- Difficalcy.Taiko/Services/TaikoCalculatorService.cs | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Difficalcy.Catch/Services/CatchCalculatorService.cs b/Difficalcy.Catch/Services/CatchCalculatorService.cs index d346b46..646a593 100644 --- a/Difficalcy.Catch/Services/CatchCalculatorService.cs +++ b/Difficalcy.Catch/Services/CatchCalculatorService.cs @@ -77,7 +77,7 @@ protected override CatchDifficulty GetDifficultyFromDifficultyAttributes(object protected override object DeserialiseDifficultyAttributes(string difficultyAttributesJson) { - return JsonSerializer.Deserialize(difficultyAttributesJson, new JsonSerializerOptions() { IncludeFields = true }); + return JsonSerializer.Deserialize(difficultyAttributesJson); } protected override CatchPerformance CalculatePerformance(CatchScore score, object difficultyAttributes) diff --git a/Difficalcy.Mania/Services/ManiaCalculatorService.cs b/Difficalcy.Mania/Services/ManiaCalculatorService.cs index 59cebc8..60b7b99 100644 --- a/Difficalcy.Mania/Services/ManiaCalculatorService.cs +++ b/Difficalcy.Mania/Services/ManiaCalculatorService.cs @@ -76,7 +76,7 @@ protected override ManiaDifficulty GetDifficultyFromDifficultyAttributes(object protected override object DeserialiseDifficultyAttributes(string difficultyAttributesJson) { - return JsonSerializer.Deserialize(difficultyAttributesJson, new JsonSerializerOptions() { IncludeFields = true }); + return JsonSerializer.Deserialize(difficultyAttributesJson); } protected override ManiaPerformance CalculatePerformance(ManiaScore score, object difficultyAttributes) diff --git a/Difficalcy.Osu/Services/OsuCalculatorService.cs b/Difficalcy.Osu/Services/OsuCalculatorService.cs index df5495a..d094cc2 100644 --- a/Difficalcy.Osu/Services/OsuCalculatorService.cs +++ b/Difficalcy.Osu/Services/OsuCalculatorService.cs @@ -63,7 +63,9 @@ protected override (object, string) CalculateDifficultyAttributes(OsuScore score MaxCombo = difficultyAttributes.MaxCombo, AimDifficulty = difficultyAttributes.AimDifficulty, SpeedDifficulty = difficultyAttributes.SpeedDifficulty, + SpeedNoteCount = difficultyAttributes.SpeedNoteCount, FlashlightDifficulty = difficultyAttributes.FlashlightDifficulty, + SliderFactor = difficultyAttributes.SliderFactor, ApproachRate = difficultyAttributes.ApproachRate, OverallDifficulty = difficultyAttributes.OverallDifficulty, DrainRate = difficultyAttributes.DrainRate, @@ -87,7 +89,7 @@ protected override OsuDifficulty GetDifficultyFromDifficultyAttributes(object di protected override object DeserialiseDifficultyAttributes(string difficultyAttributesJson) { - return JsonSerializer.Deserialize(difficultyAttributesJson, new JsonSerializerOptions() { IncludeFields = true }); + return JsonSerializer.Deserialize(difficultyAttributesJson); } protected override OsuPerformance CalculatePerformance(OsuScore score, object difficultyAttributes) diff --git a/Difficalcy.Taiko/Services/TaikoCalculatorService.cs b/Difficalcy.Taiko/Services/TaikoCalculatorService.cs index eb493c8..95d6475 100644 --- a/Difficalcy.Taiko/Services/TaikoCalculatorService.cs +++ b/Difficalcy.Taiko/Services/TaikoCalculatorService.cs @@ -83,7 +83,7 @@ protected override TaikoDifficulty GetDifficultyFromDifficultyAttributes(object protected override object DeserialiseDifficultyAttributes(string difficultyAttributesJson) { - return JsonSerializer.Deserialize(difficultyAttributesJson, new JsonSerializerOptions() { IncludeFields = true }); + return JsonSerializer.Deserialize(difficultyAttributesJson); } protected override TaikoPerformance CalculatePerformance(TaikoScore score, object difficultyAttributes)