mirror of
https://github.com/osukey/osukey.git
synced 2025-05-24 06:57:36 +09: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")]
|
[JsonProperty(@"max_combo")]
|
||||||
private int? maxCombo { get; set; }
|
private int? maxCombo { get; set; }
|
||||||
|
|
||||||
public BeatmapInfo ToBeatmap(RulesetStore rulesets)
|
public virtual BeatmapInfo ToBeatmap(RulesetStore rulesets)
|
||||||
{
|
{
|
||||||
var set = BeatmapSet?.ToBeatmapSet(rulesets);
|
var set = BeatmapSet?.ToBeatmapSet(rulesets);
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ using Newtonsoft.Json;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
public readonly BindableList<Mod> RequiredMods = new BindableList<Mod>();
|
public readonly BindableList<Mod> RequiredMods = new BindableList<Mod>();
|
||||||
|
|
||||||
[JsonProperty("beatmap")]
|
[JsonProperty("beatmap")]
|
||||||
private APIBeatmap apiBeatmap { get; set; }
|
private APIPlaylistBeatmap apiBeatmap { get; set; }
|
||||||
|
|
||||||
private APIMod[] allowedModsBacking;
|
private APIMod[] allowedModsBacking;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user