Skip to main content

DefaultCosmeticInfo

A class in Root.Township, Alta.Customization.

A cosmetic every player must wear in a category unless they pick another, with its colours. Listed in CustomizationSettings.RequiredDefaults and added when loading a look that lacks one.

Constructors​

MemberWhat it is
DefaultCosmeticInfo()Creates a DefaultCosmeticInfo from category, definition and colors.
DefaultCosmeticInfo(CustomizationCategory category, PlayerCosmeticDefinition definition, IEnumerable<TwoColors> colors)Creates a DefaultCosmeticInfo from category, definition and colors.

Fields​

MemberWhat it is
string nameInspector label, copied from the category.
3 private and internal fields
MemberWhat it is
private CustomizationCategory categoryBacking field for Category.
private TwoColors[] colorsBacking field for Colors.
private PlayerCosmeticDefinition definitionBacking field for Definition.

Properties​

MemberWhat it is
CustomizationCategory Category { get; }The customization category this default fills.
IEnumerable<TwoColors> Colors { get; }Colours applied with the default item.
ICustomizationDefinition Definition { get; }The cosmetic used as the default.

Methods​

MemberWhat it is
void OnAfterDeserialize()Does nothing.
void OnBeforeSerialize()Copies the category's name into name so the inspector list is labelled.
override string ToString()Lists the name, category, definition and colours.

Used in​

Members of other types that take, return or hold a DefaultCosmeticInfo: