Table of Contents

Namespace TinyLife.Objects

Classes

AbstractSpot

An AbstractSpot is a base class for ObjectSpot and ActionSpot.

ActionSpot

An action spot is a AbstractSpot extension that is used by Furniture to declare a location that a PersonLike can interact with the furniture at

AppliedUpgrade

A class that wraps an Upgrade and an application completion Progress percentage. This class is used by AppliedUpgrades.

Bathtub

A Furniture type that allows displaying water when a PersonLike is bathing using HasWater.

Book

A book is a furniture that can optionally display an opened texture using IsOpen. The open texture is gathered from the furniture type's TextureName, with the string "Open" prepended.

BreakableFurniture

Breakable furniture is Furniture that can be Broken and then repaired. An object of this class is automatically returned in Construct<T>(int[], Map, Vector2, float, Guid?) if no ConstructedType is set.

Chimney

A Furniture item that additionally emits smoke particles automatically if there are any Fireplace objects in the room below it that are currently enabled (IsDisabled).

Clothes

A set of information and a registry for clothing items (and hair) that a PersonLike can wear. Custom clothes can be registered using Register(Clothes).

CornerFurniture

A corner furniture is a piece of furniture that has an additional set of corner textures that it can display in various conditions. The default CornerFurniture class can be used for things like hedges, which only have a single vertical and horizontal rotation each. For objects like counters which have four distinct rotations, the subclass CornerFurniture.Counter can be used. For objects with custom connection logic, you can override ShouldConnectTo(Furniture) and GetCornerStatus(Dictionary<Direction2, Direction2>).

CornerFurniture.Counter

A counter is a CornerFurniture that can have four distinct rotations. A corner is only created for a counter if the two neighboring furnitures both face toward the same tile.

Fence

A fence is a furniture used by things like CountryFence that auto-connects similarly to CornerFurniture, but by actually adding additional connection textures onto the regular object textures

FenceType

A fence type is a set of underlying, unchanging settinsg for a FenceWall object. Fence types can be registered using Register(FenceType).

FenceWall

A fence wall is a type of WallLike that works similar to a Wall in placement, but is type-based and doesn't support wallpapering. Fence walls are an official replacement for the deprecated Fence furniture type.

Fireplace

A fireplace is a LightFurniture that additionally displays a fire animation and plays a crackling fire sound.

Food

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

FoodTypedItem

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

Fridge

A fridge is a Furniture that can contain a set of Items that a PersonLike can interact with. For any Items that are food, their ExpirationTime is increased while in a fridge.

Furniture

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

FurnitureType

A furniture type is basically a blueprint for Furniture objects. Each furniture type can create a furniture instance and the type's data will be transferred to the instance. Furniture types are automatically listed in the FurnitureTool if registered using Register(TypeSettings).

Gravestone

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

Light

A light is a semi-object that can be added to a Map using AddLight(Light). A light draws a light texture onto a lightmap and, as such, adds lighting to the rendered world.

LightFurniture

Light furniture is a furniture that additionally spawns and handles a set of Light instances. To use this class effectively, set LightSettings to determine the lights that should be spawned from the furniture.

MapObject

An instance of this class represents an object that can be, or is, part of a Map.

Newspaper

A furniture class for Newspaper.

ObjectCategory

An object category is a way to tell the Action and AbstractSpot system what type an object is. An object can have any number of categories attached to it, since DynamicEnums.DynamicEnum provides FlagsAttribute-like behavior. Custom modded categories can be added and retrieved using GetModCategory(string).

ObjectSpot

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

Outfit

An outfit is a set of WornClothes items for each clothes layer of a PersonLike. This class is used by Outfits and, as a result, CurrentOutfit.

OverlayWallHanging

A class for a wall-hung object like LgbtFlags and WorkoutPosters. Objects that use this class have a default "border" texture that requires all rotations to be present as usual, and an overlay texture that automatically gets rotated and mirrored. To set a default border texture that is different from the overlay, TextureName should be set explicitly.

Painting

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

Particle

A particle is a MLEM.Animations.SpriteAnimation that can be moved and displayed in world space. A particle is simply a MapObject that does not collide or interact directly with the world, but has all of the same properties. A new particle can be added for display using Spawn(Map, Vector2, Func<Vector2, Particle>).

Person

Represents a human person, known in the game as a Tiny. This class extends PersonLike, but stores additional human-specific information, like Projects, Jobs, Pronouns, and more.

PersonAi

This class holds the artificial intelligence implementation for a PersonLike. The AI automatically selects actions based on their ActionType.AiSettings.

PersonLike

A class that serves as a base class for Person and similar person-like objects. This class can be extended by mods to add new person-like objects that also execute actions, have relationships, can be members of households, and so on.

ScreenObject

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

Television

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

TrashBag

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

TrashCan

A class that can be used for objects like ParkTrashCan, allowing a trash can to contain a set of Content that can then be rummaged for using Rummage.

UnfinishedWoodwork

An unfinished woodwork is the item that is placed and worked on when using a WoodworkingTable

Upgrade

An upgrade is a modification that can be applied to Furniture to change the way it behaves. New upgrades can be registered using Register(Upgrade), and upgrades can be queried for a Furniture object using HasFullUpgrade(Upgrade) and GetAppliedUpgrade(Upgrade).

Vehicle

An instance of this class represents an object that can be, or is, part of a Map.

WallLike

A wall-like is the base class for Wall and FenceWall, both of which can be placed on a map to prevent traversal and add decorative elements.

WornClothes

WornClothes is a wrapper around Clothes that additionally stores the colors and whether or not the clothes are from the ClothesStorage or not

Structs

FurnitureType.TypeSettings

A set of settings that define the properties of a FurnitureType

LightFurniture.Settings

A set of settings for a LightFurniture, which can be added to a furniture type using LightSettings.

ParentInfo

A parent info is a set of information used by DrawColumns(Map, Vector2, float, object, Vector2, TextureRegion, Color, float, Point, List<Item>, bool, ParentInfo, float, SpriteEffects, bool) that allows for objects to be made to look like they're attached to another object. Currently, ParentInfo supports Furniture, Wall and Roof parents.

Interfaces

IUpdatingObject

This is an interface that can be added to MapObject classes to make them automatically update each update frame. This is used by things like PersonLike, which needs to update for movement etc.

Enums

AgeGroup

A flags enumeration that represents the age groups a PersonLike can have. Since this enumeration has the FlagsAttribute, multiple age groups can be combined into one value.

BreakableFurniture.BrokenBehavior

A set of enumeration flags that can be used to determine the behavior that a BreakableFurniture has when it is broken

ClothesIntention

A clothes intention is a way that a clothing item can be used. Since this enumeration uses the FlagsAttribute, a clothing item can have multiple intentions.

ClothesLayer

A flag enumeration that defines a set of layers that a PersonLike's Clothes are rendered with. The ordering is based on the order that these should be drawn in by default, but it can be changed per clothes item using DepthFunction.

DeathReason

An enum that represents a set of possible reasons for a PersonLike's death

IUpdatingObject.UpdateMode

A set of update modes for updating objects, used by CurrentMode.

LifeSpan

A life span is a setting in the PerSaveOptions that determines how long a person's individual AgeGroup lasts for. This property is evaluated in GetDaysBeforeAging(AgeGroup, LifeSpan).

ParentInfo.AttachmentType

An enumeration that represents the object types a ParentInfo can be attached to.

Pose

An enumeration that represents a set of poses that a PersonLike can display

PregnancyAbility

An enumeration that describes a PersonLike's pregnancy-related abilities. Note that, since this is not a FlagsAttribute enum, only one of these can be set at any given time.

SpeakStyle

A speak style is a category that speaking sounds can apply to. Each speak style contains a variety of sound effects that can be received using GetRandomSpeakSound(VoiceStyle, SpeakStyle, List<SoundEffect>, TimeSpan?) or played for a person using Speak(SpeakStyle, float, float). Note that these categories are rather vague, and that speech, in general, is not supposed to be immediately decypherable based on the speaking style used. As such, speak styles are just a very rough guidance for the sounds played.

StylePreference

A set of values that represent a style preference that a Clothes item is meant to fit most, or is intended for. Tiny Life uses the style preference system as a rough guide when randomly generating outfits and other properties for Tinies, always taking it into account with a chance of 50% and lower. Clothing items like t-shirts, pants and hats should generally use the Neutral style preference, which will make every Tiny consider the item equally.

Television.Channel

An enumeration that represents channels that a tv can display in WatchTvAction

Vehicle.VehicleType

A set of values for the game's default vehicle types, used by Vehicle

Visibility

An enumeration that represents visibility settings for MapObject objects

VoiceStyle

A voice style is a style of voice, where each voice style has a separate set of audio files attached to it. Voice styles for a PersonLike can be set in the character creator using VoiceStyle.

Delegates

BreakableFurniture.WearDownDelegate

A delegate that is used by OnWearDown.

Furniture.FurnitureTypeConstructedDelegate

A delegate method used by OnFurnitureTypeConstructed.

PersonLike.AddEmotionDelegate

A delegate used for OnAddEmotion.

PersonLike.AiPriorityForObjectDelegate

A delegate used for OnGetAiPriorityForObject.

PersonLike.EfficiencyModifierDelegate

A delegate used for OnGetEfficiencyModifier

PersonLike.EmotionModifiersChangedDelegate

A delegate used for OnEmotionModifiersChanged.

PersonLike.PassiveActionPriorityDelegate

A delegate used for OnGetPassiveActionPriority

PersonLike.RelationshipChangeDelegate

A delegate used for OnChangeFriendship and OnChangeRomance.

PersonLike.RestoreNeedDelegate

A delegate used for OnRestoreNeed.

PersonLike.SkillBoostDelegate

A delegate used for OnGetEmotionSkillBoost and OnGetPersonalitySkillBoost.

PersonLike.WalkSpeedDelegate

A delegate used for OnGetWalkSpeed