mirror of
https://github.com/ppy/osu
synced 2025-01-04 21:30:08 +00:00
Allow BeatmapDatabase to be constructed without a host.
This commit is contained in:
parent
801e4bbb0d
commit
33ef55df88
@ -17,17 +17,18 @@ namespace osu.Game.Database
|
||||
{
|
||||
public class BeatmapDatabase
|
||||
{
|
||||
private static SQLiteConnection connection { get; set; }
|
||||
private SQLiteConnection connection { get; set; }
|
||||
private BasicStorage storage;
|
||||
public event Action<BeatmapSetInfo> BeatmapSetAdded;
|
||||
|
||||
private BeatmapImporter ipc;
|
||||
|
||||
public BeatmapDatabase(BasicGameHost host)
|
||||
public BeatmapDatabase(BasicStorage storage, BasicGameHost importHost = null)
|
||||
{
|
||||
this.storage = host.Storage;
|
||||
this.storage = storage;
|
||||
|
||||
ipc = new BeatmapImporter(host, this);
|
||||
if (importHost != null)
|
||||
ipc = new BeatmapImporter(importHost, this);
|
||||
|
||||
if (connection == null)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ namespace osu.Game
|
||||
base.Load(game);
|
||||
|
||||
OszArchiveReader.Register();
|
||||
Beatmaps = new BeatmapDatabase(Host);
|
||||
Beatmaps = new BeatmapDatabase(Host.Storage, Host);
|
||||
|
||||
//this completely overrides the framework default. will need to change once we make a proper FontStore.
|
||||
Fonts = new TextureStore() { ScaleAdjust = 0.01f };
|
||||
|
Loading…
Reference in New Issue
Block a user