mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add initial game-wide beatmap flow.
This commit is contained in:
@ -136,7 +136,7 @@ namespace osu.Game.Database
|
||||
return Query<BeatmapSetInfo>().Where(s => s.BeatmapSetID == id).FirstOrDefault();
|
||||
}
|
||||
|
||||
public WorkingBeatmap GetBeatmapData(BeatmapInfo beatmapInfo)
|
||||
public WorkingBeatmap GetWorkingBeatmap(BeatmapInfo beatmapInfo)
|
||||
{
|
||||
var beatmapSet = Query<BeatmapSetInfo>().Where(s => s.BeatmapSetID == beatmapInfo.BeatmapSetID).FirstOrDefault();
|
||||
if (beatmapSet == null)
|
||||
@ -150,7 +150,7 @@ namespace osu.Game.Database
|
||||
|
||||
public Beatmap GetBeatmap(BeatmapInfo beatmapInfo)
|
||||
{
|
||||
using (WorkingBeatmap data = GetBeatmapData(beatmapInfo))
|
||||
using (WorkingBeatmap data = GetWorkingBeatmap(beatmapInfo))
|
||||
return data.Beatmap;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ using SQLiteNetExtensions.Attributes;
|
||||
|
||||
namespace osu.Game.Database
|
||||
{
|
||||
public class BeatmapInfo
|
||||
public class BeatmapInfo : IEquatable<BeatmapInfo>
|
||||
{
|
||||
[PrimaryKey]
|
||||
public int BeatmapID { get; set; }
|
||||
@ -64,5 +64,10 @@ namespace osu.Game.Database
|
||||
|
||||
// Metadata
|
||||
public string Version { get; set; }
|
||||
|
||||
public bool Equals(BeatmapInfo other)
|
||||
{
|
||||
return BeatmapID == other?.BeatmapID;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user