Files
crtr/Assets/Cryville/Crtr/Browsing/Legacy/LegacySkinDetail.cs
2023-12-25 14:26:27 +08:00

25 lines
778 B
C#

using Cryville.Crtr.Skin;
using System.Collections.Generic;
namespace Cryville.Crtr.Browsing.Legacy {
internal class LegacySkinDetail : ISkinDetail {
public string RulesetId { get { return Meta.ruleset; } }
public string Name { get { return Meta == null ? OverrideName : Meta.name; } }
public string OverrideName { get; internal set; }
public SkinDefinition Meta { get; internal set; }
public IEnumerable<MetaProperty> Properties {
get {
if (Meta == null) {
if (OverrideName != null)
yield return new MetaProperty("Name", OverrideName);
yield break;
}
yield return new MetaProperty("Name", Meta.name);
yield return new MetaProperty("Author", Meta.author);
yield return new MetaProperty("Ruleset", Meta.ruleset);
}
}
}
}