Skip to content

Commit

Permalink
Fix more missing properties in serialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Syriiin committed Nov 21, 2023
1 parent 0f13ccc commit 138e68c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Difficalcy.Catch/Services/CatchCalculatorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected override CatchDifficulty GetDifficultyFromDifficultyAttributes(object

protected override object DeserialiseDifficultyAttributes(string difficultyAttributesJson)
{
return JsonSerializer.Deserialize<CatchDifficultyAttributes>(difficultyAttributesJson, new JsonSerializerOptions() { IncludeFields = true });
return JsonSerializer.Deserialize<CatchDifficultyAttributes>(difficultyAttributesJson);
}

protected override CatchPerformance CalculatePerformance(CatchScore score, object difficultyAttributes)
Expand Down
2 changes: 1 addition & 1 deletion Difficalcy.Mania/Services/ManiaCalculatorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected override ManiaDifficulty GetDifficultyFromDifficultyAttributes(object

protected override object DeserialiseDifficultyAttributes(string difficultyAttributesJson)
{
return JsonSerializer.Deserialize<ManiaDifficultyAttributes>(difficultyAttributesJson, new JsonSerializerOptions() { IncludeFields = true });
return JsonSerializer.Deserialize<ManiaDifficultyAttributes>(difficultyAttributesJson);
}

protected override ManiaPerformance CalculatePerformance(ManiaScore score, object difficultyAttributes)
Expand Down
4 changes: 3 additions & 1 deletion Difficalcy.Osu/Services/OsuCalculatorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -87,7 +89,7 @@ protected override OsuDifficulty GetDifficultyFromDifficultyAttributes(object di

protected override object DeserialiseDifficultyAttributes(string difficultyAttributesJson)
{
return JsonSerializer.Deserialize<OsuDifficultyAttributes>(difficultyAttributesJson, new JsonSerializerOptions() { IncludeFields = true });
return JsonSerializer.Deserialize<OsuDifficultyAttributes>(difficultyAttributesJson);
}

protected override OsuPerformance CalculatePerformance(OsuScore score, object difficultyAttributes)
Expand Down
2 changes: 1 addition & 1 deletion Difficalcy.Taiko/Services/TaikoCalculatorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected override TaikoDifficulty GetDifficultyFromDifficultyAttributes(object

protected override object DeserialiseDifficultyAttributes(string difficultyAttributesJson)
{
return JsonSerializer.Deserialize<TaikoDifficultyAttributes>(difficultyAttributesJson, new JsonSerializerOptions() { IncludeFields = true });
return JsonSerializer.Deserialize<TaikoDifficultyAttributes>(difficultyAttributesJson);
}

protected override TaikoPerformance CalculatePerformance(TaikoScore score, object difficultyAttributes)
Expand Down

0 comments on commit 138e68c

Please sign in to comment.