ClothingContainerclass
Holds a collection of clothing items. Won't let you add items that aren't compatible.
Constructors1
Showing 1 constructors
public ClothingContainer()
No results match this filter.
Methods19
Showing 19 methods
public void AddRange(System.Collections.Generic.IEnumerable`1<Sandbox.ClothingContainer.ClothingEntry> clothing)
| Parameter | Type | Description |
|---|---|---|
| clothing | IEnumerable<ClothingEntry> | — |
void—public void Apply(Sandbox.SkinnedModelRenderer body)
Dress a skinned model renderer with an outfit. Doesn't download missing clothing.
| Parameter | Type | Description |
|---|---|---|
| body | SkinnedModelRenderer | — |
void—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.
| Parameter | Type | Description |
|---|---|---|
| body | SkinnedModelRenderer | — |
| token | CancellationToken | — |
Task—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.
| Parameter | Type | Description |
|---|---|---|
| connection | Connection | — |
| removeUnowned = True | bool | — |
public static Sandbox.ClothingContainer CreateFromJson(string json)
Create the container from json definitions
| Parameter | Type | Description |
|---|---|---|
| json | string | — |
public static Sandbox.ClothingContainer CreateFromLocalUser()
Create the container from the local user's setup, stripped of any unowned items.
public void Deserialize(string json)
Deserialize from Json
| Parameter | Type | Description |
|---|---|---|
| json | string | — |
void—public Sandbox.ClothingContainer.ClothingEntry FindEntry(Sandbox.Clothing clothing)
Find a clothing entry matching this clothing item
| Parameter | Type | Description |
|---|---|---|
| clothing | Clothing | — |
public bool Has(Sandbox.Clothing clothing)
Returns true if we have this clothing item
| Parameter | Type | Description |
|---|---|---|
| clothing | Clothing | — |
bool—public void Normalize()
Restrict things like Height to their sensible limits
void—public void Reset(Sandbox.SkinnedModelRenderer body)
Clear the outfit from this model, make it named
| Parameter | Type | Description |
|---|---|---|
| body | SkinnedModelRenderer | — |
void—public string Serialize()
Serialize to Json
string—No results match this filter.
Properties5
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.
float—public string Sandbox.ClothingContainer.DisplayName { get; set; }
A user set name for this setup
string—public float Sandbox.ClothingContainer.Height { get; set; }
The avatar's height. Default is 0.5f.
float—public bool Sandbox.ClothingContainer.PrefersHuman { get; set; }
If true, this avatar prefers to use a human model when possible
bool—public float Sandbox.ClothingContainer.Tint { get; set; }
For the citizen the skin color is dynamic, based on a gradient. This is 0-1.
float—No results match this filter.