s&box docs

public class Sandbox.ClothingContainer

Holds a collection of clothing items. Won't let you add items that aren't compatible.

Constructors

Showing 1 constructors

Methods

Showing 19 methods

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 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 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

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.

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.ClothingContainer

On this page

Constructorspublic ClothingContainer()Methodspublic Sandbox.ClothingContainer.ClothingEntry Add(Sandbox.Clothing clothing)public System.Void Add(Sandbox.ClothingContainer.ClothingEntry clothing)public System.Void AddRange(System.Collections.Generic.IEnumerable`1<Sandbox.ClothingContainer.ClothingEntry> clothing)public System.Void Apply(Sandbox.SkinnedModelRenderer body)public System.Threading.Tasks.Task ApplyAsync(Sandbox.SkinnedModelRenderer body, System.Threading.CancellationToken token)public static Sandbox.ClothingContainer CreateFromConnection(Sandbox.Connection connection, System.Boolean removeUnowned = True)public static Sandbox.ClothingContainer CreateFromJson(System.String json)public static Sandbox.ClothingContainer CreateFromLocalUser()public System.Void Deserialize(System.String json)public Sandbox.ClothingContainer.ClothingEntry FindEntry(Sandbox.Clothing clothing)public System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<System.String,System.Int32>> GetBodyGroups()public System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<System.String,System.Int32>> GetBodyGroups(System.Collections.Generic.IEnumerable`1<Sandbox.Clothing> items)public System.Boolean Has(Sandbox.Clothing clothing)public System.Void Normalize()public System.Void RemoveUnownedItems()public System.Void RemoveUnownedItems(Sandbox.Connection connection)public System.Void Reset(Sandbox.SkinnedModelRenderer body)public System.String Serialize()public System.Void Toggle(Sandbox.Clothing clothing)Propertiespublic System.Single Sandbox.ClothingContainer.Age { get; set; }public System.String Sandbox.ClothingContainer.DisplayName { get; set; }public System.Single Sandbox.ClothingContainer.Height { get; set; }public System.Boolean Sandbox.ClothingContainer.PrefersHuman { get; set; }public System.Single Sandbox.ClothingContainer.Tint { get; set; }Metadata