mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:02:55 +08:00
Pull playlist beatmap checksum from api
This commit is contained in:
parent
00024f56fa
commit
1ccdfd7364
23
osu.Game/Online/API/APIPlaylistBeatmap.cs
Normal file
23
osu.Game/Online/API/APIPlaylistBeatmap.cs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Online.API
|
||||
{
|
||||
public class APIPlaylistBeatmap : APIBeatmap
|
||||
{
|
||||
[JsonProperty("checksum")]
|
||||
public string Checksum { get; set; }
|
||||
|
||||
public override BeatmapInfo ToBeatmap(RulesetStore rulesets)
|
||||
{
|
||||
var b = base.ToBeatmap(rulesets);
|
||||
b.MD5Hash = Checksum;
|
||||
return b;
|
||||
}
|
||||
}
|
||||
}
|
@ -64,7 +64,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"max_combo")]
|
||||
private int? maxCombo { get; set; }
|
||||
|
||||
public BeatmapInfo ToBeatmap(RulesetStore rulesets)
|
||||
public virtual BeatmapInfo ToBeatmap(RulesetStore rulesets)
|
||||
{
|
||||
var set = BeatmapSet?.ToBeatmapSet(rulesets);
|
||||
|
||||
|
@ -7,7 +7,6 @@ using Newtonsoft.Json;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
|
||||
@ -37,7 +36,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
public readonly BindableList<Mod> RequiredMods = new BindableList<Mod>();
|
||||
|
||||
[JsonProperty("beatmap")]
|
||||
private APIBeatmap apiBeatmap { get; set; }
|
||||
private APIPlaylistBeatmap apiBeatmap { get; set; }
|
||||
|
||||
private APIMod[] allowedModsBacking;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user