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