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 Person can interact with the furniture at
- 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, 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 Person 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
- 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 Person'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 Person'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 Person 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 Person'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 Person'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.
- 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 Person. 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 Person'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(Vector2, Func<Vector2, Particle>).
- Person
A person is a MapObject placed on a Map that represents a person. It stores its actions, clothes, data and movement.
- PersonAi
This class holds the artificial intelligence implementation for a Person. The AI automatically selects actions based on their ActionType.AiSettings.
- ScreenObject
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).
- TrashBag
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).
- 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
- 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, object, Vector2, TextureRegion, Color, float, Point, List<Item>, bool, ParentInfo, float, SpriteEffects, bool, bool, 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 Person, which needs to update for movement etc.
Enums
- AgeGroup
A flags enumeration that represents the age groups a Person 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 Person'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 Person's death
- 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).
- PregnancyAbility
An enumeration that describes a Person'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.
- 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 Person can be set in the character creator using VoiceStyle.
Delegates
- Person.ActionUpdateDelegate
A delegate used for OnActionUpdated
- Person.EfficiencyModifierDelegate
A delegate used for OnGetEfficiencyModifier
- Person.EmotionModifiersChangedDelegate
A delegate used for OnEmotionModifiersChanged.
- Person.PassiveActionPriorityDelegate
A delegate used for OnGetPassiveActionPriority
- Person.RelationshipChangeDelegate
A delegate used for OnChangeFriendship and OnChangeRomance.
- Person.RestoreNeedDelegate
A delegate used for OnRestoreNeed.
- Person.WalkSpeedDelegate
A delegate used for OnGetWalkSpeed