Table of Contents

Class TrashBag

Namespace
TinyLife.Objects
Assembly
Tiny Life.dll

A furniture is an instance of a FurnitureType which is placed in the world, or in a Person's hand. To register a custom furniture, use Register(TypeSettings).

public class TrashBag : Furniture, IGenericDataHolder
Inheritance
JsonTypeSafeGenericDataHolder
TrashBag
Implements
IGenericDataHolder
Inherited Members
JsonTypeSafeGenericDataHolder.GetDataKeys()
Extension Methods

Constructors

TrashBag(Guid, FurnitureType, int[], Map, Vector2, float)

Creates a new furniture instance. By default, this is done using Construct<T>(int[], Map, Vector2, float, Guid?).

public TrashBag(Guid id, FurnitureType type, int[] colors, Map map, Vector2 pos, float floor)

Parameters

id Guid

The id to apply to the created furniture instance

type FurnitureType

The type to create an instance of

colors int[]

The colors to apply to the furniture

map Map

The map to create the furniture on

pos Vector2

The position that the furniture should have

floor float

The floor that this object is on.

Fields

Content

A collection of the Furniture items that this trash bag contains.

[DataMember]
public readonly List<Furniture> Content

Field Value

List<Furniture>

Methods

Validate()

This method is called when this object is loaded from disk. Returning false on this method causes the object to be removed from the map. By default, this method invokes OnValidated and OnEventsAttachable.

public override bool Validate()

Returns

bool

false if the object is not valid, true otherwise