Class OutfitPreset
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
namestringThe internal registry name of this outfit preset.
clothesDictionary<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
namestringThe internal registry name of this outfit preset.
clothesDictionary<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
namestringThe 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
namestringThe internal registry name of this outfit preset.
clothesWornClothes[]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
Name
The internal registry name of this outfit preset, which, if registered into Presets, it is registered under.
public readonly string Name
Field Value
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
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
personPersonLikeThe person to query.
Returns
- bool
Whether this outfit preset is valid for the given person.
Register(OutfitPreset)
public static OutfitPreset Register(OutfitPreset preset)
Parameters
presetOutfitPresetThe outfit preset to register.
Returns
- OutfitPreset
The
presetpassed.