From 6f80efdb2975d93673ebea84e9073f178f9ae0d7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 21 Oct 2016 17:01:46 +0900 Subject: [PATCH] Add a database reset method. --- osu.Game/Database/BeatmapDatabase.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index c23db37f08..e659d654f3 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -33,7 +33,18 @@ namespace osu.Game.Database } } - public void ImportBeatmap(string path) + public void Reset() + { + foreach (var setInfo in Query()) + storage.Delete(setInfo.Path); + + connection.DeleteAll(); + connection.DeleteAll(); + connection.DeleteAll(); + connection.DeleteAll(); + } + + public void Import(string path) { string hash = null; BeatmapMetadata metadata;