Add "import all skins from stable" option (and mass delete)

This commit is contained in:
Dean Herbert
2018-08-31 18:28:53 +09:00
parent b0f9c0f6f0
commit 144e80dff6
6 changed files with 78 additions and 36 deletions

View File

@ -26,17 +26,25 @@ namespace osu.Game.Skinning
public override string[] HandledExtensions => new[] { ".osk" };
protected override string ImportFromStablePath => "Skins";
/// <summary>
/// Returns a list of all usable <see cref="SkinInfo"/>s.
/// Returns a list of all usable <see cref="SkinInfo"/>s. Includes the special default skin plus all skins from <see cref="GetAllUserSkins"/>.
/// </summary>
/// <returns>A list of available <see cref="SkinInfo"/>.</returns>
public List<SkinInfo> GetAllUsableSkins()
{
var userSkins = ModelStore.ConsumableItems.Where(s => !s.DeletePending).ToList();
var userSkins = GetAllUserSkins();
userSkins.Insert(0, SkinInfo.Default);
return userSkins;
}
/// <summary>
/// Returns a list of all usable <see cref="SkinInfo"/>s that have been loaded by the user.
/// </summary>
/// <returns>A list of available <see cref="SkinInfo"/>.</returns>
public List<SkinInfo> GetAllUserSkins() => ModelStore.ConsumableItems.Where(s => !s.DeletePending).ToList();
protected override SkinInfo CreateModel(ArchiveReader archive) => new SkinInfo
{
Name = archive.Name