Table of Contents

Namespace TinyLife.World

Classes

AnimatedDoor

An opening is some sort of extrusion in a WallLike, like a window or a door. Openings are created from their underlying OpeningType.

AutoTile

An auto-tile is a Tile that visually connects to other tiles around it, while leaving a border around tiles that it doesn't connect to. Implementors can override ConnectsToTile(TileInstance, int, int, Func<Point, int, TileInstance>) to edit this behavior.

BillsMail

A Mail type that represents bills for a Household to pay

ExportedHousehold

This class represents an exported version of a Household, storing all of the Map-independent data.

ExportedLot

An exported lot is all of the relevant data of a Lot that should be exported to a file when clicking the "Export" button in the build menu. To create an exported lot from a lot, use Export()

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.

FurnitureMail

A Mail that contains a furniture item, and that can be opened using GetFurnitureMail.

Household

A household is a set of PersonLike instances that live together on the same Lot

LockableAnimatedDoor

An opening is some sort of extrusion in a WallLike, like a window or a door. Openings are created from their underlying OpeningType.

Lot

A lot is a designated area in the world (created using the LotTool). In the way it works, it acts similarly to a small Map, allowing the retrieval of various object types only in its designated area. A lot has a LotType, which determines what things can be done on the lot.

LotEmployment

A lot employment is a job that a Person executes somewhat perpetually. A person with a LotEmployment does not live on a Lot or in a Household, but instead either works at their lot employment or "leaves the city" through an TinyLife.Actions.BeAwayFromLotEmploymentAction. Lot employments can be added to lots using Employments or to a map using MapWideEmployments.

LotEmployment.Instance

An instance of a LotEmployment. This is used by LotEmployment to store additional info about their employment.

LotType

A lot type is data for a Lot that determines the required furniture on the lot as well as whether the lot is residential or not. Additionally, custom lot types can define different reasons and interactions for PersonLike objects to visit lots of the type.

Mail

A class used for sending and receiving mail. To add new mail to be sent to a Household, add it to MailToSend.

Map

A map holds all of the data about a city, like its tiles, its objects and its roads. A map is split into MapSection objects which allows faster retrieval of objects in an area.

MapAudioEmitter

An extension of the Microsoft.Xna.Framework.Audio.AudioEmitter class that also stores the emitter's WorldPosition

MapSection

A map section is a small area in a TinyLife.World.MapSection.Map that actually contains the area's objects. A map section is always SizexSize tiles large.

Opening

An opening is some sort of extrusion in a WallLike, like a window or a door. Openings are created from their underlying OpeningType.

OpeningType

An opening is some sort of extrusion in a WallLike, like a window or a door. An opening type stores data that can be used to construct a Opening instance.

Roof

A roof is an object on a Map that is on a higher level and cannot be interacted with by people

RoofType

A roof type stores settings and configurations for Roof instances. To register a new roof type, use Register(RoofType).

Room

A room is an area on a Map that is surrounded by Wall objects

Soundscape

A soundscape is a set of background/ambient sounds that play to enhance the atmosphere of the game. To create a new soundscape, it can be added to Soundscapes.

Stairs

Stairs are objects on a Map that allow Tinies to switch between floors. Stair types can be registered using StairsType. For pathfinding purposes, stairs have a fixed length of 2 tiles.

StairsType

A stairs type is a set of settings for a Stairs object that is unchanged between individual stairs objects. Stairs types can be registered using Register(StairsType).

Tile

A tile is an object on a Map that represents the covering of the ground (or the ground itself). To register a tile, use Register(string,int,System.Collections.Generic.Dictionary<Microsoft.Xna.Framework.Point,MLEM.Textures.TextureRegion>,Microsoft.Xna.Framework.Point,TinyLife.Utilities.ColorScheme,float,bool,TinyLife.World.Tile.Category,MLEM.Textures.TextureRegion,System.Func<Direction2,System.Nullable<Microsoft.Xna.Framework.Point>>,System.Nullable<int>,System.Func<Microsoft.Xna.Framework.Point,float>,System.Type).

TileInstance

A tile instance is a non-single-instance version of a Tile that is placed on a Map at a specific position and floor. Tile instances are serializable and can store additional data on a map to disk using the DataMemberAttribute.

WalkableOpening

An opening is some sort of extrusion in a WallLike, like a window or a door. Openings are created from their underlying OpeningType.

Wall

A wall is an element of a Map that stops traversal and that has a Wallpaper and optionally an Opening attached to it.

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.

WallMode

A wall mode is a way that a Wall's wallpaper can be displayed. Each wall mode represents a cutout that hides certain parts of a wall for an Opening or Roof to be displayed there.

Wallpaper

A wallpaper is a single-instanced object that can be attached to a Wall, which makes the wall render a different texture. To register custom wallpapers, use Register(string,int,System.Collections.Generic.Dictionary<Microsoft.Xna.Framework.Point,MLEM.Textures.TextureRegion>,Microsoft.Xna.Framework.Point,TinyLife.Utilities.ColorScheme,MLEM.Textures.TextureRegion,System.Nullable<int>,System.Type). Note that registered wallpapers need to use a texture generated by ApplyMasks(Texture2D, int, int).

WaterTile

A water tile is a tile that draws with an animation, as well as a static part that represents the borders of the water.

Structs

Household.RandomConstellation

A struct that is used for the RandomConstellations list and ultimately by Generate(Random).

Household.RandomPerson

A helper struct used for RandomConstellations to refer to a person of a given Type with the given AgeGroup.

Household.RandomRelation

A random relation, which is a wrapper around Relation instances between two people of certain Household.RandomPerson values, used by Household.RandomConstellation.

Household.Relation

A relation is a set of information for a Household.RandomRelation and ultimately Household.RandomConstellation that stores the GenealogyType, RelationshipType, RomanceType and Dating status that should be applied between two randomly generated household members.

Map.DrawEventArgs

A struct used for the OnDraw event.

Enums

LockType

A flags enumeration that determines which groups of people a LockableAnimatedDoor is locked for. Use IsLockedFor(LockType, PersonLike, Lot) to determine whether a combined lock type flag is locked for a given person.

Map.DrawEventArgs.DrawPhase

An enumeration used for the OnDraw event. Draw order occurs in the order of the values in this enumeration.

RoofStyle

A style for a RoofType to have. If Draw(GameTime, SpriteBatch, Map, Rectangle, int, Direction2, int[], Wallpaper, int, float, Color?, bool) has custom behavior for a custom roof type, Custom should be used.

Tile.Category

A set of enumeration flags used by Tile to determine a set of settings for it.

Delegates

Household.WeeklyBillsDelegate

A delegate method used by OnGetWeeklyBills.

LotType.CurrentVisitPriorityDelegate

A delegate method used for OnGetCurrentVisitPriority.

Map.LoadStaticMapDelegate

A delegate method used by OnLoadStaticMap. The map parameter should be set to the loaded map, if applicable.

Map.PathfindingNodeConstructDelegate

A delegate method used for OnPathfindingNodeConstruct.

Map.UpdateDelegate

A delegate used by events that are invoked when something is updated.

Map.UpdateExternalPeopleDelegate

A delegate method used by OnUpdateExternalPeople.

Map.UpdateObjectsDelegate
Map.VisitPriorityDelegate

A delegate method used for OnGetVisitPriority.

ObjectUpdateDelegate<T>

A delegate used by events that are invoked when something is updated.

Soundscape.IntensityDelegate

A delegate method used by Soundscape to determine the volume that an ambient sound should have. The returned volume should be between 0 and 1, where 0 means the soundscape will not be played at all.