forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTournamentBeatmap.cs
More file actions
114 lines (72 loc) · 4.2 KB
/
Copy pathTournamentBeatmap.cs
File metadata and controls
114 lines (72 loc) · 4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// 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 System;
using osu.Game.Beatmaps;
using osu.Game.Extensions;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Rulesets;
using static osu.Game.Online.API.Requests.Responses.APIBeatmap;
namespace osu.Game.Tournament.Models
{
public class TournamentBeatmap : IBeatmapInfo, IBeatmapSetOnlineInfo
{
public int OnlineID { get; set; }
public string DifficultyName { get; set; } = string.Empty;
public double BPM { get; set; }
public double Length { get; set; }
public double StarRating { get; set; }
public int EndTimeObjectCount { get; set; }
public int TotalObjectCount { get; set; }
public int MaxSliderRepeats { get; set; }
public int MaxSliderTicks { get; set; }
public IBeatmapMetadataInfo Metadata { get; set; } = new BeatmapMetadata();
public IBeatmapDifficultyInfo Difficulty { get; set; } = new BeatmapDifficulty();
public BeatmapSetOnlineCovers Covers { get; set; }
public IRulesetInfo Ruleset { get; set; } = new APIRuleset();
public TournamentBeatmap()
{
}
public TournamentBeatmap(APIBeatmap beatmap)
{
OnlineID = beatmap.OnlineID;
DifficultyName = beatmap.DifficultyName;
BPM = beatmap.BPM;
Length = beatmap.Length;
StarRating = beatmap.StarRating;
Metadata = beatmap.Metadata;
Difficulty = beatmap.Difficulty;
Covers = beatmap.BeatmapSet?.Covers ?? new BeatmapSetOnlineCovers();
EndTimeObjectCount = beatmap.EndTimeObjectCount;
TotalObjectCount = beatmap.TotalObjectCount;
MaxSliderRepeats = beatmap.MaxSliderRepeats;
MaxSliderTicks = beatmap.MaxSliderTicks;
Ruleset = beatmap.Ruleset;
}
public bool Equals(IBeatmapInfo? other) => other is TournamentBeatmap b && this.MatchesOnlineID(b);
#region IBeatmapInfo/IBeatmapSetOnlineInfo explicit implementation
IBeatmapSetInfo IBeatmapInfo.BeatmapSet => throw new NotImplementedException();
string IBeatmapSetOnlineInfo.Preview => throw new NotImplementedException();
double IBeatmapSetOnlineInfo.BPM => throw new NotImplementedException();
int IBeatmapSetOnlineInfo.PlayCount => throw new NotImplementedException();
int IBeatmapSetOnlineInfo.FavouriteCount => throw new NotImplementedException();
bool IBeatmapSetOnlineInfo.HasFavourited => throw new NotImplementedException();
BeatmapSetOnlineAvailability IBeatmapSetOnlineInfo.Availability => throw new NotImplementedException();
BeatmapSetOnlineGenre IBeatmapSetOnlineInfo.Genre => throw new NotImplementedException();
BeatmapSetOnlineLanguage IBeatmapSetOnlineInfo.Language => throw new NotImplementedException();
int? IBeatmapSetOnlineInfo.TrackId => throw new NotImplementedException();
int[] IBeatmapSetOnlineInfo.Ratings => throw new NotImplementedException();
BeatmapSetHypeStatus IBeatmapSetOnlineInfo.HypeStatus => throw new NotImplementedException();
BeatmapSetNominationStatus IBeatmapSetOnlineInfo.NominationStatus => throw new NotImplementedException();
string IBeatmapInfo.Hash => throw new NotImplementedException();
string IBeatmapInfo.MD5Hash => throw new NotImplementedException();
IRulesetInfo IBeatmapInfo.Ruleset => Ruleset;
DateTimeOffset IBeatmapSetOnlineInfo.Submitted => throw new NotImplementedException();
DateTimeOffset? IBeatmapSetOnlineInfo.Ranked => throw new NotImplementedException();
DateTimeOffset? IBeatmapSetOnlineInfo.LastUpdated => throw new NotImplementedException();
BeatmapOnlineStatus IBeatmapSetOnlineInfo.Status => throw new NotImplementedException();
bool IBeatmapSetOnlineInfo.HasExplicitContent => throw new NotImplementedException();
bool IBeatmapSetOnlineInfo.HasVideo => throw new NotImplementedException();
bool IBeatmapSetOnlineInfo.HasStoryboard => throw new NotImplementedException();
#endregion
}
}