mirror of
https://github.com/ppy/osu
synced 2025-01-11 08:39:31 +00:00
Fix multiple issues with json serialisation of online info (causing tournament failures)
This commit is contained in:
parent
4dafe666ba
commit
6adb0f068b
@ -161,7 +161,7 @@ namespace osu.Game.Tournament.Tests
|
||||
Artist = "Test Artist",
|
||||
ID = RNG.Next(0, 1000000)
|
||||
},
|
||||
OnlineInfo = new BeatmapOnlineInfo(),
|
||||
OnlineInfo = new APIBeatmap(),
|
||||
};
|
||||
|
||||
protected override ITestSceneTestRunner CreateRunner() => new TournamentTestSceneTestRunner();
|
||||
|
@ -9,6 +9,7 @@ using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
@ -47,7 +48,7 @@ namespace osu.Game.Beatmaps
|
||||
public BeatmapDifficulty BaseDifficulty { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public IBeatmapOnlineInfo OnlineInfo { get; set; }
|
||||
public APIBeatmap OnlineInfo { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public int? MaxCombo { get; set; }
|
||||
|
@ -74,6 +74,8 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"max_combo")]
|
||||
public int? MaxCombo { get; set; }
|
||||
|
||||
public double BPM { get; set; }
|
||||
|
||||
public virtual BeatmapInfo ToBeatmapInfo(RulesetStore rulesets)
|
||||
{
|
||||
var set = BeatmapSet?.ToBeatmapSet(rulesets);
|
||||
@ -120,7 +122,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
|
||||
public IRulesetInfo Ruleset => new RulesetInfo { ID = RulesetID };
|
||||
|
||||
public double BPM => throw new NotImplementedException();
|
||||
[JsonIgnore]
|
||||
public string Hash => throw new NotImplementedException();
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user