1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00
osu-lazer/osu.Game/Skinning/SkinInfo.cs

47 lines
1.3 KiB
C#
Raw Normal View History

// 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 17:19:50 +08:00
using System;
using System.Collections.Generic;
using osu.Game.Configuration;
2018-04-13 17:19:50 +08:00
using osu.Game.Database;
namespace osu.Game.Skinning
{
public class SkinInfo : IHasFiles<SkinFileInfo>, IEquatable<SkinInfo>, IHasPrimaryKey, ISoftDelete
{
internal const int DEFAULT_SKIN = 0;
internal const int CLASSIC_SKIN = -1;
internal const int RANDOM_SKIN = -2;
2018-04-13 17:19:50 +08:00
public int ID { get; set; }
public string Name { get; set; }
2018-11-28 18:01:22 +08:00
public string Hash { get; set; }
2018-04-13 17:19:50 +08:00
public string Creator { get; set; }
public List<SkinFileInfo> Files { get; set; }
public List<DatabasedSetting> Settings { get; set; }
2018-04-13 17:19:50 +08:00
public bool DeletePending { get; set; }
public static SkinInfo Default { get; } = new SkinInfo
{
ID = DEFAULT_SKIN,
Name = "osu!lazer",
Creator = "team osu!"
};
2018-04-13 17:19:50 +08:00
public bool Equals(SkinInfo other) => other != null && ID == other.ID;
public override string ToString()
{
string author = Creator == null ? string.Empty : $"({Creator})";
return $"{Name} {author}".Trim();
}
2018-04-13 17:19:50 +08:00
}
}