mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Beatmap -> BeatmapInfo + add foreign key
This commit is contained in:
parent
2ee181daf7
commit
ed02847752
@ -58,7 +58,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"beatmap")]
|
||||
private BeatmapInfo beatmap
|
||||
{
|
||||
set => Beatmap = value;
|
||||
set => BeatmapInfo = value;
|
||||
}
|
||||
|
||||
[JsonProperty(@"beatmapset")]
|
||||
@ -67,10 +67,10 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
set
|
||||
{
|
||||
// extract the set ID to its correct place.
|
||||
Beatmap.BeatmapSet = new BeatmapSetInfo { OnlineBeatmapSetID = value.ID };
|
||||
BeatmapInfo.BeatmapSet = new BeatmapSetInfo { OnlineBeatmapSetID = value.ID };
|
||||
value.ID = 0;
|
||||
|
||||
Beatmap.Metadata = value;
|
||||
BeatmapInfo.Metadata = value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
|
||||
public void ApplyBeatmap(BeatmapInfo beatmap)
|
||||
{
|
||||
Beatmap = beatmap;
|
||||
BeatmapInfo = beatmap;
|
||||
ApplyRuleset(beatmap.Ruleset);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Scoring.Legacy
|
||||
var version = sr.ReadInt32();
|
||||
|
||||
currentBeatmap = GetBeatmap(sr.ReadString()).Beatmap;
|
||||
score.Beatmap = currentBeatmap.BeatmapInfo;
|
||||
score.BeatmapInfo = currentBeatmap.BeatmapInfo;
|
||||
|
||||
score.User = new User { Username = sr.ReadString() };
|
||||
score.MD5Hash = sr.ReadString();
|
||||
|
@ -65,7 +65,9 @@ namespace osu.Game.Scoring
|
||||
[JsonIgnore]
|
||||
public Replay Replay;
|
||||
|
||||
public BeatmapInfo Beatmap;
|
||||
public int BeatmapInfoID { get; set; }
|
||||
|
||||
public BeatmapInfo BeatmapInfo;
|
||||
|
||||
public long OnlineScoreID;
|
||||
|
||||
|
@ -275,7 +275,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
var score = new Score
|
||||
{
|
||||
Beatmap = Beatmap.Value.BeatmapInfo,
|
||||
BeatmapInfo = Beatmap.Value.BeatmapInfo,
|
||||
Ruleset = ruleset
|
||||
};
|
||||
ScoreProcessor.PopulateScore(score);
|
||||
|
Loading…
Reference in New Issue
Block a user