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