mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 08:33:55 +09:00
Fix ScoreInfo
oversights causing automapper to fail
Parameter in ctor *has* to be named `realmUser` else automapper will try to map to the `User` property.
This commit is contained in:
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using AutoMapper;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
@ -45,11 +46,11 @@ namespace osu.Game.Scoring
|
|||||||
[MapTo("User")]
|
[MapTo("User")]
|
||||||
public RealmUser RealmUser { get; set; } = null!;
|
public RealmUser RealmUser { get; set; } = null!;
|
||||||
|
|
||||||
public ScoreInfo(BeatmapInfo beatmap, RulesetInfo ruleset, RealmUser user)
|
public ScoreInfo(BeatmapInfo beatmap, RulesetInfo ruleset, RealmUser realmUser)
|
||||||
{
|
{
|
||||||
Ruleset = ruleset;
|
Ruleset = ruleset;
|
||||||
Beatmap = beatmap;
|
Beatmap = beatmap;
|
||||||
RealmUser = user;
|
RealmUser = realmUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
@ -61,6 +62,7 @@ namespace osu.Game.Scoring
|
|||||||
// Eventually we should either persist enough information to realm to not require the API lookups, or perform the API lookups locally.
|
// Eventually we should either persist enough information to realm to not require the API lookups, or perform the API lookups locally.
|
||||||
private APIUser? user;
|
private APIUser? user;
|
||||||
|
|
||||||
|
[IgnoreMap]
|
||||||
public APIUser User
|
public APIUser User
|
||||||
{
|
{
|
||||||
get => user ??= new APIUser
|
get => user ??= new APIUser
|
||||||
@ -164,7 +166,6 @@ namespace osu.Game.Scoring
|
|||||||
[Ignored]
|
[Ignored]
|
||||||
public bool Passed { get; set; } = true;
|
public bool Passed { get; set; } = true;
|
||||||
|
|
||||||
[Ignored]
|
|
||||||
public int Combo { get; set; }
|
public int Combo { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Reference in New Issue
Block a user