TinyLifeExampleMod/Api/TinyLife/Objects/ObjectSpot.md

2.8 KiB

ObjectSpot

Namespace: TinyLife > Objects

Assembly: Tiny Life.dll

Summary

An object spot is a TinyLife.Objects.AbstractSpot extension that is used by TinyLife.Objects.Furniture to declare a location that another TinyLife.Objects.Furniture object can be slotted into. This behavior is used for things like plates on counters, flower pots on bedside tables etc.

Constructors

Name Summary
ObjectSpot ( Vector2, Predicate<FurnitureType>, Single, Direction2[] ) Creates a new object spot with the given settings
ObjectSpot ( Vector2, Vector2, Predicate<FurnitureType>, Single, Direction2[] ) Creates a new object spot with the given settings

Fields

Type Name Summary
Predicate<FurnitureType> IsFurnitureAllowed A predicate that determines if the given TinyLife.Objects.FurnitureType is allowed to be put into this object spot

Methods

Return Name Summary
IEnumerable<T> GetContents ( Furniture, Boolean ) Returns the TinyLife.Objects.Furniture objects that are currently slotted into this spot

Static Methods

Return Name Summary
ObjectSpot[] CounterSpots ( Boolean ) A helper method to create a set of TinyLife.Objects.ObjectSpot instnaces for counters and stoves. The resulting set contains a single object spot for TinyLife.Objects.ObjectCategory.SmallObject and TinyLife.Objects.ObjectCategory.CounterObject object, or TinyLife.Objects.FurnitureType.PreparedFood and TinyLife.Objects.FurnitureType.Pot if `` is true.
IEnumerable<ObjectSpot> TableSpots ( Point ) A helper method to create a set of TinyLife.Objects.ObjectSpot instances for a table of the given size. The resulting set of object spots will have spots for TinyLife.Objects.ObjectCategory.Chair objects on each side as well as TinyLife.Objects.ObjectCategory.SmallObject objects on each tile position.