Table of Contents

Class FurnitureType

Namespace
TinyLife.Objects
Assembly
Tiny Life.dll

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).

[JsonConverter(typeof(StaticJsonConverter<FurnitureType>), new object[] { typeof(FurnitureType), "PrivateTypes" })]
public class FurnitureType : GenericDataHolder, IGenericDataHolder, IEmotionSource
Inheritance
GenericDataHolder
FurnitureType
Implements
IGenericDataHolder
Inherited Members
GenericDataHolder.GetDataKeys()
Extension Methods

Fields

BabyBathtub

public static readonly FurnitureType BabyBathtub

Field Value

FurnitureType

BabyBook

public static readonly FurnitureType BabyBook

Field Value

FurnitureType

BarFrameChair

public static readonly FurnitureType BarFrameChair

Field Value

FurnitureType

BaristaCoffeeMachine

public static readonly FurnitureType BaristaCoffeeMachine

Field Value

FurnitureType

BigBush

public static readonly FurnitureType BigBush

Field Value

FurnitureType

BigPedestal

public static readonly FurnitureType BigPedestal

Field Value

FurnitureType

BigRocks

public static readonly FurnitureType[] BigRocks

Field Value

FurnitureType[]

BigVase

public static readonly FurnitureType BigVase

Field Value

FurnitureType

BirchTree

public static readonly FurnitureType BirchTree

Field Value

FurnitureType

Book

public static readonly FurnitureType Book

Field Value

FurnitureType

BookCart

public static readonly FurnitureType BookCart

Field Value

FurnitureType

BottledSunlight

public static readonly FurnitureType BottledSunlight

Field Value

FurnitureType

BridgeBorderEnd

public static readonly FurnitureType BridgeBorderEnd

Field Value

FurnitureType

BridgeBorderSegment

public static readonly FurnitureType BridgeBorderSegment

Field Value

FurnitureType

BridgeBorderStart

public static readonly FurnitureType BridgeBorderStart

Field Value

FurnitureType

BulbFairyLights

public static readonly FurnitureType BulbFairyLights

Field Value

FurnitureType

CafeDisplayCase

public static readonly FurnitureType CafeDisplayCase

Field Value

FurnitureType

CafeSign

public static readonly FurnitureType CafeSign

Field Value

FurnitureType

Cattails

public static readonly FurnitureType[] Cattails

Field Value

FurnitureType[]

ChildStove

public static readonly FurnitureType ChildStove

Field Value

FurnitureType

CloverPatch

public static readonly FurnitureType CloverPatch

Field Value

FurnitureType

CocktailShaker

public static readonly FurnitureType CocktailShaker

Field Value

FurnitureType

ColorfulCandles

public static readonly FurnitureType ColorfulCandles

Field Value

FurnitureType

ColoringBook

public static readonly FurnitureType ColoringBook

Field Value

FurnitureType

ContemporaryBar

public static readonly FurnitureType ContemporaryBar

Field Value

FurnitureType

ContemporaryCocktailBar

public static readonly FurnitureType ContemporaryCocktailBar

Field Value

FurnitureType

ContemporaryCounter

public static readonly FurnitureType ContemporaryCounter

Field Value

FurnitureType

ContemporaryDoubleBed

public static readonly FurnitureType ContemporaryDoubleBed

Field Value

FurnitureType

ContemporaryNightstand

public static readonly FurnitureType ContemporaryNightstand

Field Value

FurnitureType

ContemporaryPaintings

public static readonly FurnitureType[] ContemporaryPaintings

Field Value

FurnitureType[]

ContemporarySingleBed

public static readonly FurnitureType ContemporarySingleBed

Field Value

FurnitureType

CounterLight

public static readonly FurnitureType CounterLight

Field Value

FurnitureType

CountryFence

[Obsolete("Use the new FenceWall system instead")]
public static readonly FurnitureType CountryFence

Field Value

FurnitureType

CushionedWoodworkingSofa

public static readonly FurnitureType CushionedWoodworkingSofa

Field Value

FurnitureType

CustomPainting

public static readonly FurnitureType CustomPainting

Field Value

FurnitureType

Cypress

public static readonly FurnitureType Cypress

Field Value

FurnitureType

DecorativeBowls

public static readonly FurnitureType[] DecorativeBowls

Field Value

FurnitureType[]

DecorativeKite

public static readonly FurnitureType DecorativeKite

Field Value

FurnitureType

DecorativeLogPile

public static readonly FurnitureType DecorativeLogPile

Field Value

FurnitureType

DirtyTextures

The textures that this furniture type overlays over its regular Textures when it is Dirty. If DirtyOverlayTextureName is not set, this field will be null.

public readonly IDictionary<Direction2, TextureRegion[]> DirtyTextures

Field Value

IDictionary<Direction2, TextureRegion[]>

Doormat

public static readonly FurnitureType Doormat

Field Value

FurnitureType

Dumbbell

public static readonly FurnitureType Dumbbell

Field Value

FurnitureType

DumbbellRack

public static readonly FurnitureType DumbbellRack

Field Value

FurnitureType

EdisonWoodworkingLamp

public static readonly FurnitureType EdisonWoodworkingLamp

Field Value

FurnitureType

EmptyGlass

public static readonly FurnitureType EmptyGlass

Field Value

FurnitureType

EmptyMug

public static readonly FurnitureType EmptyMug

Field Value

FurnitureType

EmptyPlate

public static readonly FurnitureType EmptyPlate

Field Value

FurnitureType

EmptyPlatter

public static readonly FurnitureType EmptyPlatter

Field Value

FurnitureType

EvergreenTree

public static readonly FurnitureType EvergreenTree

Field Value

FurnitureType

FancyOttoman

public static readonly FurnitureType FancyOttoman

Field Value

FurnitureType

FoodGlass

public static readonly FurnitureType FoodGlass

Field Value

FurnitureType

FoodMug

public static readonly FurnitureType FoodMug

Field Value

FurnitureType

FoodPlate

public static readonly FurnitureType FoodPlate

Field Value

FurnitureType

FoodPlatter

public static readonly FurnitureType FoodPlatter

Field Value

FurnitureType

FourPostBed

public static readonly FurnitureType FourPostBed

Field Value

FurnitureType

FrameChair

public static readonly FurnitureType FrameChair

Field Value

FurnitureType

FullyCushionedWoodworkingSofa

public static readonly FurnitureType FullyCushionedWoodworkingSofa

Field Value

FurnitureType

GlassDinnerTable

public static readonly FurnitureType GlassDinnerTable

Field Value

FurnitureType

GlassJars

public static readonly FurnitureType[] GlassJars

Field Value

FurnitureType[]

GlassPenCup

public static readonly FurnitureType GlassPenCup

Field Value

FurnitureType

GlassSingleTable

public static readonly FurnitureType GlassSingleTable

Field Value

FurnitureType

GrassPatch

public static readonly FurnitureType GrassPatch

Field Value

FurnitureType

Gravestone

public static readonly FurnitureType Gravestone

Field Value

FurnitureType

GrillingFood

public static readonly FurnitureType GrillingFood

Field Value

FurnitureType

Hedge

public static readonly FurnitureType Hedge

Field Value

FurnitureType

HomeworkBook

public static readonly FurnitureType HomeworkBook

Field Value

FurnitureType

HugeRectangleRug

public static readonly FurnitureType HugeRectangleRug

Field Value

FurnitureType

LargeContemporaryPainting

public static readonly FurnitureType LargeContemporaryPainting

Field Value

FurnitureType

LargeOpenShelf

public static readonly FurnitureType LargeOpenShelf

Field Value

FurnitureType

LargePotPlant

public static readonly FurnitureType[] LargePotPlant

Field Value

FurnitureType[]

LargeRectangleRug

public static readonly FurnitureType LargeRectangleRug

Field Value

FurnitureType

LargeRoundRug

public static readonly FurnitureType LargeRoundRug

Field Value

FurnitureType

LargeWoodworkingSofa

public static readonly FurnitureType LargeWoodworkingSofa

Field Value

FurnitureType

LgbtFlags

public static readonly FurnitureType[] LgbtFlags

Field Value

FurnitureType[]

LightUpCase

public static readonly FurnitureType LightUpCase

Field Value

FurnitureType

LongDinnerTable

public static readonly FurnitureType LongDinnerTable

Field Value

FurnitureType

MagazineStack

public static readonly FurnitureType MagazineStack

Field Value

FurnitureType

Mailbox

public static readonly FurnitureType Mailbox

Field Value

FurnitureType

MapleFairyLights

public static readonly FurnitureType MapleFairyLights

Field Value

FurnitureType

MapleTree

public static readonly FurnitureType MapleTree

Field Value

FurnitureType

MixologyKit

public static readonly FurnitureType MixologyKit

Field Value

FurnitureType

MobilePhone

public static readonly FurnitureType MobilePhone

Field Value

FurnitureType

ModernBed

public static readonly FurnitureType ModernBed

Field Value

FurnitureType

ModernBedsideLamp

public static readonly FurnitureType ModernBedsideLamp

Field Value

FurnitureType

ModernChair

public static readonly FurnitureType ModernChair

Field Value

FurnitureType

ModernCoffeeTable

public static readonly FurnitureType ModernCoffeeTable

Field Value

FurnitureType

ModernComputer

public static readonly FurnitureType ModernComputer

Field Value

FurnitureType

ModernCrib

public static readonly FurnitureType ModernCrib

Field Value

FurnitureType

ModernFridge

public static readonly FurnitureType ModernFridge

Field Value

FurnitureType

ModernLandlinePhone

public static readonly FurnitureType ModernLandlinePhone

Field Value

FurnitureType

ModernModularCurtains

public static readonly FurnitureType[] ModernModularCurtains

Field Value

FurnitureType[]

ModernShapeRug

public static readonly FurnitureType ModernShapeRug

Field Value

FurnitureType

ModernSingleBed

public static readonly FurnitureType ModernSingleBed

Field Value

FurnitureType

ModernSingleDiningTable

public static readonly FurnitureType ModernSingleDiningTable

Field Value

FurnitureType

ModernSink

public static readonly FurnitureType ModernSink

Field Value

FurnitureType

ModernStove

public static readonly FurnitureType ModernStove

Field Value

FurnitureType

ModernTv

public static readonly FurnitureType ModernTv

Field Value

FurnitureType

ModernTvStand

public static readonly FurnitureType ModernTvStand

Field Value

FurnitureType

ModernWoodworkingLamp

public static readonly FurnitureType ModernWoodworkingLamp

Field Value

FurnitureType

Mop

public static readonly FurnitureType Mop

Field Value

FurnitureType

MuseumSign

public static readonly FurnitureType MuseumSign

Field Value

FurnitureType

Newspaper

public static readonly FurnitureType Newspaper

Field Value

FurnitureType

OakTree

public static readonly FurnitureType OakTree

Field Value

FurnitureType

OldComputer

public static readonly FurnitureType OldComputer

Field Value

FurnitureType

OrnateBed

public static readonly FurnitureType OrnateBed

Field Value

FurnitureType

OrnateFlowerBed

public static readonly FurnitureType OrnateFlowerBed

Field Value

FurnitureType

OrnateSingleBed

public static readonly FurnitureType OrnateSingleBed

Field Value

FurnitureType

PaintBrush

public static readonly FurnitureType PaintBrush

Field Value

FurnitureType

Palette

public static readonly FurnitureType Palette

Field Value

FurnitureType

PaperPendantLight

public static readonly FurnitureType PaperPendantLight

Field Value

FurnitureType

ParkTrashCan

public static readonly FurnitureType ParkTrashCan

Field Value

FurnitureType

Pen

public static readonly FurnitureType Pen

Field Value

FurnitureType

PlainCoffeeTable

public static readonly FurnitureType PlainCoffeeTable

Field Value

FurnitureType

PlateStack

public static readonly FurnitureType PlateStack

Field Value

FurnitureType

Pot

public static readonly FurnitureType Pot

Field Value

FurnitureType

PotPlant

public static readonly FurnitureType PotPlant

Field Value

FurnitureType

PreparedFood

public static readonly FurnitureType PreparedFood

Field Value

FurnitureType

PrismaticShard

public static readonly FurnitureType PrismaticShard

Field Value

FurnitureType

ProteinShakeKit

public static readonly FurnitureType ProteinShakeKit

Field Value

FurnitureType

Puddle

public static readonly FurnitureType Puddle

Field Value

FurnitureType

Puzzle

public static readonly FurnitureType Puzzle

Field Value

FurnitureType

RetroChair

public static readonly FurnitureType RetroChair

Field Value

FurnitureType

RetroClock

public static readonly FurnitureType RetroClock

Field Value

FurnitureType

RetroDinnerTable

public static readonly FurnitureType RetroDinnerTable

Field Value

FurnitureType

RetroDinnerTableSquare

public static readonly FurnitureType RetroDinnerTableSquare

Field Value

FurnitureType

RetroDoubleBed

public static readonly FurnitureType RetroDoubleBed

Field Value

FurnitureType

RetroFridge

public static readonly FurnitureType RetroFridge

Field Value

FurnitureType

RetroSingleBed

public static readonly FurnitureType RetroSingleBed

Field Value

FurnitureType

RetroSingleTable

public static readonly FurnitureType RetroSingleTable

Field Value

FurnitureType

RetroSingleTableSquare

public static readonly FurnitureType RetroSingleTableSquare

Field Value

FurnitureType

RetroSofa

public static readonly FurnitureType RetroSofa

Field Value

FurnitureType

RetroStove

public static readonly FurnitureType RetroStove

Field Value

FurnitureType

RetroTv

public static readonly FurnitureType RetroTv

Field Value

FurnitureType

RhombusRug

public static readonly FurnitureType RhombusRug

Field Value

FurnitureType

RoundCeilingLamp

public static readonly FurnitureType RoundCeilingLamp

Field Value

FurnitureType

RoundedBackChair

public static readonly FurnitureType RoundedBackChair

Field Value

FurnitureType

Sandbox

public static readonly FurnitureType Sandbox

Field Value

FurnitureType

SandboxStuff

public static readonly FurnitureType SandboxStuff

Field Value

FurnitureType

SelfCareBottles

public static readonly FurnitureType SelfCareBottles

Field Value

FurnitureType

Settings

This furniture type's settings

public readonly FurnitureType.TypeSettings Settings

Field Value

FurnitureType.TypeSettings

SimpleBar

public static readonly FurnitureType SimpleBar

Field Value

FurnitureType

SimpleBench

public static readonly FurnitureType SimpleBench

Field Value

FurnitureType

SimpleBookshelf

public static readonly FurnitureType SimpleBookshelf

Field Value

FurnitureType

SimpleCeilingLamp

public static readonly FurnitureType SimpleCeilingLamp

Field Value

FurnitureType

SimpleChair

public static readonly FurnitureType SimpleChair

Field Value

FurnitureType

SimpleChangingStation

public static readonly FurnitureType SimpleChangingStation

Field Value

FurnitureType

SimpleCounter

public static readonly FurnitureType SimpleCounter

Field Value

FurnitureType

SimpleDesk

public static readonly FurnitureType SimpleDesk

Field Value

FurnitureType

SimpleDoubleSidedBookshelf

public static readonly FurnitureType SimpleDoubleSidedBookshelf

Field Value

FurnitureType

SimpleDrawer

public static readonly FurnitureType SimpleDrawer

Field Value

FurnitureType

SimpleEasel

public static readonly FurnitureType SimpleEasel

Field Value

FurnitureType

SimpleGroundLight

public static readonly FurnitureType SimpleGroundLight

Field Value

FurnitureType

SimpleLamp

public static readonly FurnitureType SimpleLamp

Field Value

FurnitureType

SimpleLowTable

public static readonly FurnitureType SimpleLowTable

Field Value

FurnitureType

SimpleNightstand

public static readonly FurnitureType SimpleNightstand

Field Value

FurnitureType

SimpleOpenShower

public static readonly FurnitureType SimpleOpenShower

Field Value

FurnitureType

SimplePicnicTable

public static readonly FurnitureType SimplePicnicTable

Field Value

FurnitureType

SimplePotty

public static readonly FurnitureType SimplePotty

Field Value

FurnitureType

SimpleShower

public static readonly FurnitureType SimpleShower

Field Value

FurnitureType

SimpleSofa

public static readonly FurnitureType SimpleSofa

Field Value

FurnitureType

SimpleStoneWall

[Obsolete("Use the new FenceWall system instead")]
public static readonly FurnitureType SimpleStoneWall

Field Value

FurnitureType

SimpleToilet

public static readonly FurnitureType SimpleToilet

Field Value

FurnitureType

SimpleWallSink

public static readonly FurnitureType SimpleWallSink

Field Value

FurnitureType

SingleLilyPad

public static readonly FurnitureType SingleLilyPad

Field Value

FurnitureType

SkillBooks

public static readonly Dictionary<FurnitureType, SkillType> SkillBooks

Field Value

Dictionary<FurnitureType, SkillType>

SmallBarbecue

public static readonly FurnitureType SmallBarbecue

Field Value

FurnitureType

SmallBlinds

public static readonly FurnitureType[] SmallBlinds

Field Value

FurnitureType[]

SmallBookStack

public static readonly FurnitureType SmallBookStack

Field Value

FurnitureType

SmallBush

public static readonly FurnitureType SmallBush

Field Value

FurnitureType

SmallCandlestick

public static readonly FurnitureType SmallCandlestick

Field Value

FurnitureType

SmallChimney

public static readonly FurnitureType SmallChimney

Field Value

FurnitureType

SmallJungleGym

public static readonly FurnitureType SmallJungleGym

Field Value

FurnitureType

SmallMirror

public static readonly FurnitureType SmallMirror

Field Value

FurnitureType

SmallModernShapeRug

public static readonly FurnitureType SmallModernShapeRug

Field Value

FurnitureType

SmallOpenShelf

public static readonly FurnitureType SmallOpenShelf

Field Value

FurnitureType

SmallPicnicTable

public static readonly FurnitureType SmallPicnicTable

Field Value

FurnitureType

SmallPlant

public static readonly FurnitureType SmallPlant

Field Value

FurnitureType

SmallRocks

public static readonly FurnitureType SmallRocks

Field Value

FurnitureType

SmallShovel

public static readonly FurnitureType SmallShovel

Field Value

FurnitureType

SmallSimpleCurtain

public static readonly FurnitureType SmallSimpleCurtain

Field Value

FurnitureType

Spanner

public static readonly FurnitureType Spanner

Field Value

FurnitureType

Sponge

public static readonly FurnitureType Sponge

Field Value

FurnitureType

SquareDinnerTable

public static readonly FurnitureType SquareDinnerTable

Field Value

FurnitureType

SquareIndoorTrashCan

public static readonly FurnitureType SquareIndoorTrashCan

Field Value

FurnitureType

SquarePlantPots

public static readonly FurnitureType[] SquarePlantPots

Field Value

FurnitureType[]

StandingCoatRack

public static readonly FurnitureType StandingCoatRack

Field Value

FurnitureType

StandingDesk

public static readonly FurnitureType StandingDesk

Field Value

FurnitureType

StandingMirror

public static readonly FurnitureType StandingMirror

Field Value

FurnitureType

StorageBoxSeat

public static readonly FurnitureType StorageBoxSeat

Field Value

FurnitureType

StreetLamps

public static readonly FurnitureType[] StreetLamps

Field Value

FurnitureType[]

StudyBook

public static readonly FurnitureType StudyBook

Field Value

FurnitureType

Succulents

public static readonly FurnitureType[] Succulents

Field Value

FurnitureType[]

Sunflowers

public static readonly FurnitureType[] Sunflowers

Field Value

FurnitureType[]

SwirlWoodworkingLamp

public static readonly FurnitureType SwirlWoodworkingLamp

Field Value

FurnitureType

TallBoxBookshelf

public static readonly FurnitureType TallBoxBookshelf

Field Value

FurnitureType

TallCountryFence

[Obsolete("Use the new FenceWall system instead")]
public static readonly FurnitureType TallCountryFence

Field Value

FurnitureType

TallDresser

public static readonly FurnitureType TallDresser

Field Value

FurnitureType

TeaKit

public static readonly FurnitureType TeaKit

Field Value

FurnitureType

Textures

The textures that this furniture type has. Each texture is automatically loaded based on the registered MLEM.Data.DataTextureAtlas instances. If a furniture type has multiple Map entries (or multiple Colors), additional texture regions will automatically be created to the right of the original texture region.

public readonly IDictionary<Direction2, TextureRegion[]> Textures

Field Value

IDictionary<Direction2, TextureRegion[]>

TinyDinnerTable

public static readonly FurnitureType TinyDinnerTable

Field Value

FurnitureType

ToyCar

public static readonly FurnitureType ToyCar

Field Value

FurnitureType

TraditionalBar

public static readonly FurnitureType TraditionalBar

Field Value

FurnitureType

TraditionalBedsideLamp

public static readonly FurnitureType TraditionalBedsideLamp

Field Value

FurnitureType

TraditionalCeilingLight

public static readonly FurnitureType TraditionalCeilingLight

Field Value

FurnitureType

TraditionalCounter

public static readonly FurnitureType TraditionalCounter

Field Value

FurnitureType

TraditionalFireplace

public static readonly FurnitureType TraditionalFireplace

Field Value

FurnitureType

TrashBag

public static readonly FurnitureType TrashBag

Field Value

FurnitureType

Treadmill

public static readonly FurnitureType Treadmill

Field Value

FurnitureType

TreeStumps

public static readonly FurnitureType[] TreeStumps

Field Value

FurnitureType[]

Types

A list of all available furniture types. Register furniture types using Register(TypeSettings).

public static readonly ReadOnlyDictionary<string, FurnitureType> Types

Field Value

ReadOnlyDictionary<string, FurnitureType>

UnfinishedWoodwork

public static readonly FurnitureType UnfinishedWoodwork

Field Value

FurnitureType

UnpreparedFood

public static readonly FurnitureType UnpreparedFood

Field Value

FurnitureType

Vases

public static readonly FurnitureType[] Vases

Field Value

FurnitureType[]

VerticalBookStack

public static readonly FurnitureType VerticalBookStack

Field Value

FurnitureType

VerticalDumbbellRack

public static readonly FurnitureType VerticalDumbbellRack

Field Value

FurnitureType

VerticalPlanter

public static readonly FurnitureType VerticalPlanter

Field Value

FurnitureType

WashingUpStuff

public static readonly FurnitureType WashingUpStuff

Field Value

FurnitureType

WheelieBin

public static readonly FurnitureType WheelieBin

Field Value

FurnitureType

WideBoxBookshelf

public static readonly FurnitureType WideBoxBookshelf

Field Value

FurnitureType

WideConsoleTable

public static readonly FurnitureType WideConsoleTable

Field Value

FurnitureType

WindowPlants

public static readonly FurnitureType[] WindowPlants

Field Value

FurnitureType[]

WinterTree

public static readonly FurnitureType WinterTree

Field Value

FurnitureType

Wisteria

public static readonly FurnitureType[] Wisteria

Field Value

FurnitureType[]

WoodenPowerPole

public static readonly FurnitureType WoodenPowerPole

Field Value

FurnitureType

WoodenPowerPoleLine

public static readonly FurnitureType WoodenPowerPoleLine

Field Value

FurnitureType

WoodenStool

public static readonly FurnitureType WoodenStool

Field Value

FurnitureType

WoodenToyBox

public static readonly FurnitureType WoodenToyBox

Field Value

FurnitureType

WoodworkingChair

public static readonly FurnitureType WoodworkingChair

Field Value

FurnitureType

WoodworkingChairArmrests

public static readonly FurnitureType WoodworkingChairArmrests

Field Value

FurnitureType

WoodworkingCloset

public static readonly FurnitureType WoodworkingCloset

Field Value

FurnitureType

WoodworkingTable

public static readonly FurnitureType WoodworkingTable

Field Value

FurnitureType

WorkoutPosters

public static readonly FurnitureType[] WorkoutPosters

Field Value

FurnitureType[]

Properties

Rotations

The valid rotations that this furniture has, which are based on the available Textures.

public ICollection<Direction2> Rotations { get; }

Property Value

ICollection<Direction2>

SourceString

A (localized) string that is displayed when hovering over an EmotionModifier that has this source

public string SourceString { get; }

Property Value

string

Methods

Construct<T>(int[], Map, Vector2, float, Guid?)

Constructs a new Furniture object from this furniture type

public T Construct<T>(int[] colors, Map map, Vector2 pos, float floor, Guid? id = null) where T : Furniture

Parameters

colors int[]

The indices of the colors that the furniture should have

map Map

The map that the furniture should be added to

pos Vector2

The position that the furniture should have

floor float

The floor that the furniture should be on.

id Guid?

The id that the furniture should have, or a random one by defualt

Returns

T

A new furniture instance of this type

Type Parameters

T

DrawColumns(Map, Vector2, float, object, Vector2, Direction2, TextureRegion, Color, float, List<Item>, bool, ParentInfo, float, SpriteEffects)

This method is a semi-overload of DrawColumns(Map, Vector2, float, object, Vector2, TextureRegion, Color, float, Point, List<Item>, bool, ParentInfo, float, SpriteEffects, bool) that additionally calculates some values required for rendering furniture with certain ObjectCategory values correctly

public void DrawColumns(Map map, Vector2 position, float floor, object batch, Vector2 drawPos, Direction2 rotation, TextureRegion texture, Color color, float scale, List<StaticSpriteBatch.Item> items, bool pivot = true, ParentInfo parent = default, float depthOffset = 0, SpriteEffects effects = SpriteEffects.None)

Parameters

map Map

The map that the object is on

position Vector2

The position that the object is on, in world space

floor float

The floor to draw at.

batch object

The sprite batch to draw with, which is either a Microsoft.Xna.Framework.Graphics.SpriteBatch or MLEM.Graphics.StaticSpriteBatch.

drawPos Vector2

The position to draw at, in draw space

rotation Direction2

The rotation that this object has, used for some calculations

texture TextureRegion

The texture region to draw

color Color

The color to draw with

scale float

The scale to draw at

items List<StaticSpriteBatch.Item>

A list of sprite batch items that items should be added to if the batch is a MLEM.Graphics.StaticSpriteBatch.

pivot bool

The texture's pivot point, in texture-space pixels

parent ParentInfo

The object's parent object

depthOffset float

A value that is added to the calculated object's depth

effects SpriteEffects

The sprite effects to use when rendering

DrawDirtyOverlay(Map, Vector2, float, object, Vector2, Direction2, float, List<Item>, Color?, bool, ParentInfo, float)

Draws the DirtyTextures of this object into the world. Note that, if this object cannot get dirty, this method will throw a NullReferenceException. By default, the dirty overlay is automatically drawn by a Furniture object that is Dirty.

public void DrawDirtyOverlay(Map map, Vector2 position, float floor, object batch, Vector2 drawPos, Direction2 rotation, float scale, List<StaticSpriteBatch.Item> items, Color? overrideColor = null, bool pivot = true, ParentInfo parent = default, float depthOffset = 0)

Parameters

map Map

The map that the object is on

position Vector2

The position that the object is on, in world space

floor float

The floor to draw at.

batch object

The sprite batch to draw with, which is either a Microsoft.Xna.Framework.Graphics.SpriteBatch or MLEM.Graphics.StaticSpriteBatch.

drawPos Vector2

The position to draw at, in draw space

rotation Direction2

The rotation that this object has, used for some calculations

scale float

The scale to draw at

items List<StaticSpriteBatch.Item>

A list of sprite batch items that items should be added to if the batch is a MLEM.Graphics.StaticSpriteBatch.

overrideColor Color?

An optional color to override the default colors of the furniture

pivot bool

The texture's pivot point, in texture-space pixels

parent ParentInfo

The object's parent object

depthOffset float

A value that is added to the calculated object's depth

DrawLayers(Map, Vector2, float, object, Vector2, Direction2, TextureRegion[], int[], float, List<Item>, bool, ParentInfo, Color?, float)

Draws the furniture type with the given data. Internally, this uses DrawColumns(Map, Vector2, float, object, Vector2, Direction2, TextureRegion, Color, float, List<Item>, bool, ParentInfo, float, SpriteEffects) to draw each layer with a slight depth offset.

public void DrawLayers(Map map, Vector2 position, float floor, object batch, Vector2 drawPos, Direction2 rotation, TextureRegion[] layers, int[] colors, float scale, List<StaticSpriteBatch.Item> items, bool pivot = true, ParentInfo parent = default, Color? overrideColor = null, float depthOffset = 0)

Parameters

map Map

The map to draw the furniture type on

position Vector2

The position on the map that the furniture is at

floor float

The floor to draw at.

batch object

The sprite batch to draw with, which is either a Microsoft.Xna.Framework.Graphics.SpriteBatch or MLEM.Graphics.StaticSpriteBatch.

drawPos Vector2

The position that this furniture should be drawn at on the screen

rotation Direction2

The rotation of the furniture

layers TextureRegion[]

The textures to draw this furniture with

colors int[]

The indices in the Colors that the furniture should be drawn with

scale float

The scale that the furniture should be drawn with

items List<StaticSpriteBatch.Item>

A list of sprite batch items that items should be added to if the batch is a MLEM.Graphics.StaticSpriteBatch.

pivot bool

Whether or not the furniture should be shifted by its pivot point

parent ParentInfo

The parent that the furniture is attached to. Can be null.

overrideColor Color?

The color that should be used to draw this furniture instead of colors

depthOffset float

A value that is added to the depth calculation for drawing this furniture type

GetBestRotation(Direction2)

Returns a MLEM.Misc.Direction2 that is closest to goal, but that this object is allowed to have. The return value is guaranteed to be contained in Rotations and have the same verticality as goal, or be the same value.

public Direction2 GetBestRotation(Direction2 goal)

Parameters

goal Direction2

The goal rotation

Returns

Direction2

The closest possible rotation to the goal rotation

GetConstructedType()

Returns the Type that is constructed for this furniture type's Furniture instance. By default, ConstructedType is returned if it is non-null, and otherwise, BreakableFurniture, LightFurniture and Furniture are considered.

public Type GetConstructedType()

Returns

Type

The type to construct for this furniture type's instance.

GetCoveredTiles(Vector2, Point)

Returns a rectangle that contains all of the tiles which intersect with the furniture when placed at the given position, with the given size.

public static Rectangle GetCoveredTiles(Vector2 pos, Point size)

Parameters

pos Vector2

The position to place the furniture at

size Point

The size of the furniture

Returns

Rectangle

A rectangle with all of the tiles that are covered

GetDisplayName(Furniture)

Returns this furniture item's display name, optionally based on the given Furniture instance.

public string GetDisplayName(Furniture instance)

Parameters

instance Furniture

The furniture instance to get the name for, or null to get the default name.

Returns

string

This furniture item's display name.

GetReferenceTexture(Direction2?)

Returns the reference texture of this furniture type for the given rotation. The reference texture is the first layer of the texture for the given rotation.

public TextureRegion GetReferenceTexture(Direction2? rotation = null)

Parameters

rotation Direction2?

The rotation to get the reference texture for. Defaults to DefaultRotation.

Returns

TextureRegion

The reference texture for the given rotation

GetRotatedOffset(Vector2, Direction2, Direction2)

Returns the rotated offset of the given position, based on this furniture type's Size. This method is used to offset the position of furniture objects based on their (visual) rotation.

public Vector2 GetRotatedOffset(Vector2 offset, Direction2 objectRotation, Direction2 rotation)

Parameters

offset Vector2

The offset position to rotate

objectRotation Direction2

The original rotation of the object

rotation Direction2

The rotation to rotate by

Returns

Vector2

The rotated offset of the offset

GetSize(Direction2)

Returns the Size of this furniture type, modified based on the given rotation.

public Point GetSize(Direction2 rotation)

Parameters

rotation Direction2

The rotation to return the size for

Returns

Point

The modified size

GetTexture(string, bool)

Returns a MLEM.Textures.TextureRegion with the given name, based on all of the textures in the base game and all GetCustomFurnitureTextures(ModInfo) textures.

public static TextureRegion GetTexture(string name, bool throwIfNotFound = true)

Parameters

name string

The name of the texture to get

throwIfNotFound bool

Whether an exception should be thrown if the texture is not found

Returns

TextureRegion

A texture region with the given name, or null if there is none

GetTextures(string, int, Func<Direction2, bool>)

Create a dictionary of textures for all MLEM.Misc.Direction2Helper.Adjacent directions that have a texture registered for them. Textures are gathered using GetCustomFurnitureTextures(ModInfo), and textures need to be suffixed with the direction's string to be recognized. This method is used for furniture of all kinds.

public static Dictionary<Direction2, TextureRegion[]> GetTextures(string name, int amount = 1, Func<Direction2, bool> shouldThrow = null)

Parameters

name string

The name of the texture to load

amount int

The amount of layers the texture has

shouldThrow Func<Direction2, bool>

Whether an exception should be thrown if the texture is not found

Returns

Dictionary<Direction2, TextureRegion[]>

A dictionary of directions to texture layers

HasCategory(ObjectCategory)

Returns whether this type's Settings have any of the supplied ObjectCategory values

public bool HasCategory(ObjectCategory category)

Parameters

category ObjectCategory

The categories to query

Returns

bool

Whether any of the passed categories are present

Register(TypeSettings)

Registers a custom furniture type

public static FurnitureType Register(FurnitureType.TypeSettings settings)

Parameters

settings FurnitureType.TypeSettings

The settings to apply to the custom furniture type

Returns

FurnitureType

The registered furniture type

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.