From 7bdf1fe1bf980fecf32ff37dd44ee9f7f0bc0284 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 18 Oct 2016 15:48:24 -0400 Subject: [PATCH] Drop BeatmapSet, only BeatmapSetInfo is necessary --- osu.Game/Beatmaps/BeatmapSet.cs | 19 ------------------- osu.Game/Database/BeatmapDatabase.cs | 5 +++++ osu.Game/osu.Game.csproj | 1 - 3 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 osu.Game/Beatmaps/BeatmapSet.cs diff --git a/osu.Game/Beatmaps/BeatmapSet.cs b/osu.Game/Beatmaps/BeatmapSet.cs deleted file mode 100644 index 55c888384f..0000000000 --- a/osu.Game/Beatmaps/BeatmapSet.cs +++ /dev/null @@ -1,19 +0,0 @@ -//Copyright (c) 2007-2016 ppy Pty Ltd . -//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System.Collections.Generic; -using osu.Game.Database; -using osu.Game.Users; - -namespace osu.Game.Beatmaps -{ - /// - /// A beatmap set contains multiple beatmap (difficulties). - /// - public class BeatmapSet - { - public BeatmapSetInfo BeatmapSetInfo { get; set; } - public List Beatmaps { get; protected set; } = new List(); - public User Creator { get; set; } - } -} diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index 7b3b741b50..73809c6fc2 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -82,6 +82,11 @@ public ArchiveReader GetReader(BeatmapSetInfo beatmapSet) return ArchiveReader.GetReader(storage, beatmapSet.Path); } + public BeatmapSetInfo GetBeatmapSet(int id) + { + return Query().Where(s => s.BeatmapSetID == id).FirstOrDefault(); + } + public Beatmap GetBeatmap(BeatmapInfo beatmapInfo) { var beatmapSet = Query() diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 14b61c218f..8f029070ca 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -61,7 +61,6 @@ -