mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Refactor WorkingBeatmap
Gets ArchiveReader out of WorkingBeatmap and delegates extracting stuff from it to subclasses. Should enable us to make an OnlineWorkingBeatmap or so.
This commit is contained in:
@ -18,7 +18,7 @@ using SQLiteNetExtensions.Extensions;
|
||||
|
||||
namespace osu.Game.Database
|
||||
{
|
||||
public class BeatmapDatabase
|
||||
public partial class BeatmapDatabase
|
||||
{
|
||||
private SQLiteConnection connection { get; }
|
||||
private Storage storage;
|
||||
@ -342,18 +342,5 @@ namespace osu.Game.Database
|
||||
}
|
||||
|
||||
public bool Exists(BeatmapSetInfo beatmapSet) => storage.Exists(beatmapSet.Path);
|
||||
|
||||
private class DatabaseWorkingBeatmap : WorkingBeatmap
|
||||
{
|
||||
private readonly BeatmapDatabase database;
|
||||
|
||||
public DatabaseWorkingBeatmap(BeatmapDatabase database, BeatmapInfo beatmapInfo, BeatmapSetInfo beatmapSetInfo, bool withStoryboard = false)
|
||||
: base(beatmapInfo, beatmapSetInfo, withStoryboard)
|
||||
{
|
||||
this.database = database;
|
||||
}
|
||||
|
||||
protected override ArchiveReader GetReader() => database?.GetReader(BeatmapSetInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user