Table of Contents

Class OutfitPreset

Namespace
TinyLife.Objects
Assembly
TinyLife.dll

An outfit preset is a collection of WornClothes put together into a pre-made outfit that a player can select for their Tinies. Outfit presets are generally expected not to contain any hair (and thus, only items usually considered clothing), and they are displayed in the character creator with the active Tiny's skin color and hair. New outfit presets can be registered by mods using the Register(OutfitPreset) method.

public class OutfitPreset
Inheritance
OutfitPreset
Inherited Members
Extension Methods

Constructors

OutfitPreset(string, Dictionary<ClothesLayer, (string Clothes, int[] Colors)>)

Creates a new outfit preset with the given settings.

public OutfitPreset(string name, Dictionary<ClothesLayer, (string Clothes, int[] Colors)> clothes)

Parameters

name string

The internal registry name of this outfit preset.

clothes Dictionary<ClothesLayer, (string Clothes, int[] Colors)>

The clothes that this outfit preset should contain, by their layer and Types registry name.

OutfitPreset(string, Dictionary<ClothesLayer, WornClothes>)

Creates a new outfit preset with the given settings.

public OutfitPreset(string name, Dictionary<ClothesLayer, WornClothes> clothes)

Parameters

name string

The internal registry name of this outfit preset.

clothes Dictionary<ClothesLayer, WornClothes>

The clothes that this outfit preset should contain, by their layer.

OutfitPreset(string, params (string Clothes, int[] Colors)[])

Creates a new outfit preset with the given settings.

public OutfitPreset(string name, params (string Clothes, int[] Colors)[] clothes)

Parameters

name string

The internal registry name of this outfit preset.

clothes (string Clothes, int[] Colors)[]

The clothes that this outfit preset should contain, by their Types registry name.

OutfitPreset(string, params WornClothes[])

Creates a new outfit preset with the given settings.

public OutfitPreset(string name, params WornClothes[] clothes)

Parameters

name string

The internal registry name of this outfit preset.

clothes WornClothes[]

The clothes that this outfit preset should contain.

Fields

Clothes

The clothes contained in this outfit preset.

public readonly Dictionary<ClothesLayer, WornClothes> Clothes

Field Value

Dictionary<ClothesLayer, WornClothes>

Name

The internal registry name of this outfit preset, which, if registered into Presets, it is registered under.

public readonly string Name

Field Value

string

Presets

The set of currently registered outfit presets. Additional presets can be registered using Register(OutfitPreset).

public static readonly ReadOnlyDictionary<string, OutfitPreset> Presets

Field Value

ReadOnlyDictionary<string, OutfitPreset>

Methods

IsValid(PersonLike)

Returns whether all of the clothing items in this outfit preset are valid for the given person, based on the return value of their GetValidClothes(ClothesLayer) method.

public bool IsValid(PersonLike person)

Parameters

person PersonLike

The person to query.

Returns

bool

Whether this outfit preset is valid for the given person.

Register(OutfitPreset)

Registers the given outfit preset into the Presets registry by its Name.

public static OutfitPreset Register(OutfitPreset preset)

Parameters

preset OutfitPreset

The outfit preset to register.

Returns

OutfitPreset

The preset passed.