mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Centralise access to WorkingBeatmaps.
They can now only be instantiated from BeatmapDatabase and are abstract (to avoid misuse).
This commit is contained in:
@ -8,6 +8,7 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Beatmaps.IO;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Objects;
|
||||
@ -72,7 +73,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
|
||||
decoder.Process(b);
|
||||
|
||||
beatmap = new WorkingBeatmap(b);
|
||||
beatmap = new TestWorkingBeatmap(b);
|
||||
}
|
||||
|
||||
Add(new Box
|
||||
@ -90,5 +91,16 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Beatmap = beatmap
|
||||
});
|
||||
}
|
||||
|
||||
class TestWorkingBeatmap : WorkingBeatmap
|
||||
{
|
||||
public TestWorkingBeatmap(Beatmap beatmap)
|
||||
: base(beatmap.BeatmapInfo, beatmap.BeatmapInfo.BeatmapSet)
|
||||
{
|
||||
Beatmap = beatmap;
|
||||
}
|
||||
|
||||
protected override ArchiveReader GetReader() => null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user