2019-01-24 08:43:03 +00:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2019-05-25 06:09:31 +00:00
|
|
|
|
using osu.Game.Configuration;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Game.Database;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Skinning
|
|
|
|
|
{
|
|
|
|
|
public class SkinInfo : IHasFiles<SkinFileInfo>, IEquatable<SkinInfo>, IHasPrimaryKey, ISoftDelete
|
|
|
|
|
{
|
|
|
|
|
public int ID { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
2018-11-28 10:01:22 +00:00
|
|
|
|
public string Hash { get; set; }
|
|
|
|
|
|
2018-04-13 09:19:50 +00:00
|
|
|
|
public string Creator { get; set; }
|
|
|
|
|
|
|
|
|
|
public List<SkinFileInfo> Files { get; set; }
|
|
|
|
|
|
2019-05-25 06:09:31 +00:00
|
|
|
|
public List<DatabasedSetting> Settings { get; set; }
|
|
|
|
|
|
2018-04-13 09:19:50 +00:00
|
|
|
|
public bool DeletePending { get; set; }
|
|
|
|
|
|
2018-11-28 10:01:22 +00:00
|
|
|
|
public string FullName => $"\"{Name}\" by {Creator}";
|
|
|
|
|
|
2019-08-29 07:38:39 +00:00
|
|
|
|
public static SkinInfo Default { get; } = new SkinInfo
|
|
|
|
|
{
|
|
|
|
|
Name = "osu!lazer",
|
|
|
|
|
Creator = "team osu!"
|
|
|
|
|
};
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
public bool Equals(SkinInfo other) => other != null && ID == other.ID;
|
|
|
|
|
|
2018-11-28 10:01:22 +00:00
|
|
|
|
public override string ToString() => FullName;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|