1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:02:55 +08:00

Merge branch 'master' into online-info-as-interface

This commit is contained in:
Dan Balasescu 2021-10-21 17:14:57 +09:00 committed by GitHub
commit 8ae05ee8f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 24 deletions

View File

@ -19,6 +19,9 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"status")]
public BeatmapSetOnlineStatus Status { get; set; }
[JsonProperty("checksum")]
public string Checksum { get; set; }
[JsonProperty(@"beatmapset")]
public APIBeatmapSet BeatmapSet { get; set; }
@ -78,6 +81,7 @@ namespace osu.Game.Online.API.Requests.Responses
// this is actually an incorrect mapping (Length is calculated as drain length in lazer's import process, see BeatmapManager.calculateLength).
Length = TimeSpan.FromSeconds(length).TotalMilliseconds,
Status = Status,
MD5Hash = Checksum,
BeatmapSet = set,
Metrics = metrics,
MaxCombo = maxCombo,

View File

@ -1,23 +0,0 @@
// 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.Rooms
{
public class APIPlaylistBeatmap : APIBeatmap
{
[JsonProperty("checksum")]
public string Checksum { get; set; }
public override BeatmapInfo ToBeatmapInfo(RulesetStore rulesets)
{
var b = base.ToBeatmapInfo(rulesets);
b.MD5Hash = Checksum;
return b;
}
}
}

View File

@ -7,6 +7,7 @@ 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;
@ -42,7 +43,7 @@ namespace osu.Game.Online.Rooms
public readonly BindableList<Mod> RequiredMods = new BindableList<Mod>();
[JsonProperty("beatmap")]
private APIPlaylistBeatmap apiBeatmap { get; set; }
private APIBeatmap apiBeatmap { get; set; }
private APIMod[] allowedModsBacking;