public class Sandbox.ClothingContainer
Holds a collection of clothing items. Won't let you add items that aren't compatible.
Constructors
Showing 1 constructors
public ClothingContainer()
No results match this filter.
Methods
Showing 19 methods
public void AddRange(System.Collections.Generic.IEnumerable`1<Sandbox.ClothingContainer.ClothingEntry> clothing)
public void Apply(Sandbox.SkinnedModelRenderer body)
Dress a skinned model renderer with an outfit. Doesn't download missing clothing.
public System.Threading.Tasks.Task ApplyAsync(Sandbox.SkinnedModelRenderer body, System.Threading.CancellationToken token)
Dresses a skinned model with an outfit. Will apply all the clothes it can immediately, then download any missing clothing.
public static Sandbox.ClothingContainer CreateFromConnection(Sandbox.Connection connection, bool removeUnowned = True)
Create the container from a connection's avatar, filtered to only items they are verified to own.
Parameters
removeUnowned: Default: True
public static Sandbox.ClothingContainer CreateFromJson(string json)
Create the container from json definitions
public static Sandbox.ClothingContainer CreateFromLocalUser()
Create the container from the local user's setup
public void Deserialize(string json)
Deserialize from Json
public Sandbox.ClothingContainer.ClothingEntry FindEntry(Sandbox.Clothing clothing)
Find a clothing entry matching this clothing item
public bool Has(Sandbox.Clothing clothing)
Returns true if we have this clothing item
public void Normalize()
Restrict things like Height to their sensible limits
public void Reset(Sandbox.SkinnedModelRenderer body)
Clear the outfit from this model, make it named
public string Serialize()
Serialize to Json
public void Toggle(Sandbox.Clothing clothing)
Add a clothing item if we don't already contain it, else remove it
No results match this filter.
Properties
Showing 5 properties
public float Sandbox.ClothingContainer.Age { get; set; }
The avatar's age. Default is 0.0f. We'll pick a skin based on this.
public string Sandbox.ClothingContainer.DisplayName { get; set; }
A user set name for this setup
public float Sandbox.ClothingContainer.Height { get; set; }
The avatar's height. Default is 0.5f.
public bool Sandbox.ClothingContainer.PrefersHuman { get; set; }
If true, this avatar prefers to use a human model when possible
public float Sandbox.ClothingContainer.Tint { get; set; }
For the citizen the skin color is dynamic, based on a gradient. This is 0-1.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.ClothingContainer |