Search Results for

    Show / Hide Table of Contents

    Class 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(FurnitureType.TypeSettings).

    Inheritance
    System.Object
    MLEM.Misc.GenericDataHolder
    FurnitureType
    Implements
    MLEM.Misc.IGenericDataHolder
    IPricedObject
    IEmotionSource
    Inherited Members
    MLEM.Misc.GenericDataHolder.SetData(System.String, System.Object)
    MLEM.Misc.GenericDataHolder.GetData<T>(System.String)
    MLEM.Misc.GenericDataHolder.GetDataKeys()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: TinyLife.Objects
    Assembly: Tiny Life.dll
    Syntax
    [JsonConverter(typeof(StaticJsonConverter<FurnitureType>), new object[]{typeof(FurnitureType), "PrivateTypes"})]
    public class FurnitureType : GenericDataHolder, IGenericDataHolder, IPricedObject, IEmotionSource

    Fields

    BaristaCoffeeMachine

    Declaration
    public static readonly FurnitureType BaristaCoffeeMachine
    Field Value
    Type Description
    FurnitureType

    BirchTree

    Declaration
    public static readonly FurnitureType BirchTree
    Field Value
    Type Description
    FurnitureType

    Book

    Declaration
    public static readonly FurnitureType Book
    Field Value
    Type Description
    FurnitureType

    BulbFairyLights

    Declaration
    public static readonly FurnitureType BulbFairyLights
    Field Value
    Type Description
    FurnitureType

    CafeDisplayCase

    Declaration
    public static readonly FurnitureType CafeDisplayCase
    Field Value
    Type Description
    FurnitureType

    CafeSign

    Declaration
    public static readonly FurnitureType CafeSign
    Field Value
    Type Description
    FurnitureType

    ChildStove

    Declaration
    public static readonly FurnitureType ChildStove
    Field Value
    Type Description
    FurnitureType

    ColorfulCandles

    Declaration
    public static readonly FurnitureType ColorfulCandles
    Field Value
    Type Description
    FurnitureType

    CountryFence

    Declaration
    public static readonly FurnitureType CountryFence
    Field Value
    Type Description
    FurnitureType

    CushionedWoodworkingSofa

    Declaration
    public static readonly FurnitureType CushionedWoodworkingSofa
    Field Value
    Type Description
    FurnitureType

    CustomPainting

    Declaration
    public static readonly FurnitureType CustomPainting
    Field Value
    Type Description
    FurnitureType

    Cypress

    Declaration
    public static readonly FurnitureType Cypress
    Field Value
    Type Description
    FurnitureType

    DecorativeKite

    Declaration
    public static readonly FurnitureType DecorativeKite
    Field Value
    Type Description
    FurnitureType

    DecorativeLogPile

    Declaration
    public static readonly FurnitureType DecorativeLogPile
    Field Value
    Type Description
    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.

    Declaration
    public readonly IDictionary<Direction2, TextureRegion[]> DirtyTextures
    Field Value
    Type Description
    System.Collections.Generic.IDictionary<MLEM.Misc.Direction2, MLEM.Textures.TextureRegion[]>

    Doormat

    Declaration
    public static readonly FurnitureType Doormat
    Field Value
    Type Description
    FurnitureType

    Dumbbell

    Declaration
    public static readonly FurnitureType Dumbbell
    Field Value
    Type Description
    FurnitureType

    DumbbellRack

    Declaration
    public static readonly FurnitureType DumbbellRack
    Field Value
    Type Description
    FurnitureType

    EdisonWoodworkingLamp

    Declaration
    public static readonly FurnitureType EdisonWoodworkingLamp
    Field Value
    Type Description
    FurnitureType

    EmptyGlass

    Declaration
    public static readonly FurnitureType EmptyGlass
    Field Value
    Type Description
    FurnitureType

    EmptyMug

    Declaration
    public static readonly FurnitureType EmptyMug
    Field Value
    Type Description
    FurnitureType

    EmptyPlate

    Declaration
    public static readonly FurnitureType EmptyPlate
    Field Value
    Type Description
    FurnitureType

    EmptyPlatter

    Declaration
    public static readonly FurnitureType EmptyPlatter
    Field Value
    Type Description
    FurnitureType

    EvergreenTree

    Declaration
    public static readonly FurnitureType EvergreenTree
    Field Value
    Type Description
    FurnitureType

    FoodGlass

    Declaration
    public static readonly FurnitureType FoodGlass
    Field Value
    Type Description
    FurnitureType

    FoodMug

    Declaration
    public static readonly FurnitureType FoodMug
    Field Value
    Type Description
    FurnitureType

    FoodPlate

    Declaration
    public static readonly FurnitureType FoodPlate
    Field Value
    Type Description
    FurnitureType

    FoodPlatter

    Declaration
    public static readonly FurnitureType FoodPlatter
    Field Value
    Type Description
    FurnitureType

    FourPostBed

    Declaration
    public static readonly FurnitureType FourPostBed
    Field Value
    Type Description
    FurnitureType

    FullyCushionedWoodworkingSofa

    Declaration
    public static readonly FurnitureType FullyCushionedWoodworkingSofa
    Field Value
    Type Description
    FurnitureType

    GlassDinnerTable

    Declaration
    public static readonly FurnitureType GlassDinnerTable
    Field Value
    Type Description
    FurnitureType

    GlassPenCup

    Declaration
    public static readonly FurnitureType GlassPenCup
    Field Value
    Type Description
    FurnitureType

    GlassSingleTable

    Declaration
    public static readonly FurnitureType GlassSingleTable
    Field Value
    Type Description
    FurnitureType

    GrassPatch

    Declaration
    public static readonly FurnitureType GrassPatch
    Field Value
    Type Description
    FurnitureType

    Gravestone

    Declaration
    public static readonly FurnitureType Gravestone
    Field Value
    Type Description
    FurnitureType

    GrillingFood

    Declaration
    public static readonly FurnitureType GrillingFood
    Field Value
    Type Description
    FurnitureType

    Hedge

    Declaration
    public static readonly FurnitureType Hedge
    Field Value
    Type Description
    FurnitureType

    HomeworkBook

    Declaration
    public static readonly FurnitureType HomeworkBook
    Field Value
    Type Description
    FurnitureType

    HugeRectangleRug

    Declaration
    public static readonly FurnitureType HugeRectangleRug
    Field Value
    Type Description
    FurnitureType

    LargePotPlant

    Declaration
    public static readonly FurnitureType[] LargePotPlant
    Field Value
    Type Description
    FurnitureType[]

    LargeRectangleRug

    Declaration
    public static readonly FurnitureType LargeRectangleRug
    Field Value
    Type Description
    FurnitureType

    LargeRoundRug

    Declaration
    public static readonly FurnitureType LargeRoundRug
    Field Value
    Type Description
    FurnitureType

    LargeWoodworkingSofa

    Declaration
    public static readonly FurnitureType LargeWoodworkingSofa
    Field Value
    Type Description
    FurnitureType

    LgbtFlags

    Declaration
    public static readonly FurnitureType[] LgbtFlags
    Field Value
    Type Description
    FurnitureType[]

    LongDinnerTable

    Declaration
    public static readonly FurnitureType LongDinnerTable
    Field Value
    Type Description
    FurnitureType

    Mailbox

    Declaration
    public static readonly FurnitureType Mailbox
    Field Value
    Type Description
    FurnitureType

    MapleTree

    Declaration
    public static readonly FurnitureType MapleTree
    Field Value
    Type Description
    FurnitureType

    MixologyKit

    Declaration
    public static readonly FurnitureType MixologyKit
    Field Value
    Type Description
    FurnitureType

    ModernBed

    Declaration
    public static readonly FurnitureType ModernBed
    Field Value
    Type Description
    FurnitureType

    ModernBedsideLamp

    Declaration
    public static readonly FurnitureType ModernBedsideLamp
    Field Value
    Type Description
    FurnitureType

    ModernChair

    Declaration
    public static readonly FurnitureType ModernChair
    Field Value
    Type Description
    FurnitureType

    ModernComputer

    Declaration
    public static readonly FurnitureType ModernComputer
    Field Value
    Type Description
    FurnitureType

    ModernFridge

    Declaration
    public static readonly FurnitureType ModernFridge
    Field Value
    Type Description
    FurnitureType

    ModernSingleBed

    Declaration
    public static readonly FurnitureType ModernSingleBed
    Field Value
    Type Description
    FurnitureType

    ModernSink

    Declaration
    public static readonly FurnitureType ModernSink
    Field Value
    Type Description
    FurnitureType

    ModernStove

    Declaration
    public static readonly FurnitureType ModernStove
    Field Value
    Type Description
    FurnitureType

    ModernTv

    Declaration
    public static readonly FurnitureType ModernTv
    Field Value
    Type Description
    FurnitureType

    ModernTvStand

    Declaration
    public static readonly FurnitureType ModernTvStand
    Field Value
    Type Description
    FurnitureType

    ModernWoodworkingLamp

    Declaration
    public static readonly FurnitureType ModernWoodworkingLamp
    Field Value
    Type Description
    FurnitureType

    Mop

    Declaration
    public static readonly FurnitureType Mop
    Field Value
    Type Description
    FurnitureType

    Newspaper

    Declaration
    public static readonly FurnitureType Newspaper
    Field Value
    Type Description
    FurnitureType

    OakTree

    Declaration
    public static readonly FurnitureType OakTree
    Field Value
    Type Description
    FurnitureType

    OldComputer

    Declaration
    public static readonly FurnitureType OldComputer
    Field Value
    Type Description
    FurnitureType

    OrnateBed

    Declaration
    public static readonly FurnitureType OrnateBed
    Field Value
    Type Description
    FurnitureType

    OrnateFlowerBed

    Declaration
    public static readonly FurnitureType OrnateFlowerBed
    Field Value
    Type Description
    FurnitureType

    OrnateSingleBed

    Declaration
    public static readonly FurnitureType OrnateSingleBed
    Field Value
    Type Description
    FurnitureType

    PaintBrush

    Declaration
    public static readonly FurnitureType PaintBrush
    Field Value
    Type Description
    FurnitureType

    PaperPendantLight

    Declaration
    public static readonly FurnitureType PaperPendantLight
    Field Value
    Type Description
    FurnitureType

    ParkTrashCan

    Declaration
    public static readonly FurnitureType ParkTrashCan
    Field Value
    Type Description
    FurnitureType

    PlainCoffeeTable

    Declaration
    public static readonly FurnitureType PlainCoffeeTable
    Field Value
    Type Description
    FurnitureType

    Pot

    Declaration
    public static readonly FurnitureType Pot
    Field Value
    Type Description
    FurnitureType

    PotPlant

    Declaration
    public static readonly FurnitureType PotPlant
    Field Value
    Type Description
    FurnitureType

    PreparedFood

    Declaration
    public static readonly FurnitureType PreparedFood
    Field Value
    Type Description
    FurnitureType

    ProteinShakeKit

    Declaration
    public static readonly FurnitureType ProteinShakeKit
    Field Value
    Type Description
    FurnitureType

    Puddle

    Declaration
    public static readonly FurnitureType Puddle
    Field Value
    Type Description
    FurnitureType

    Puzzle

    Declaration
    public static readonly FurnitureType Puzzle
    Field Value
    Type Description
    FurnitureType

    Sandbox

    Declaration
    public static readonly FurnitureType Sandbox
    Field Value
    Type Description
    FurnitureType

    Settings

    This furniture type's settings

    Declaration
    public readonly FurnitureType.TypeSettings Settings
    Field Value
    Type Description
    FurnitureType.TypeSettings

    SimpleBar

    Declaration
    public static readonly FurnitureType SimpleBar
    Field Value
    Type Description
    FurnitureType

    SimpleBench

    Declaration
    public static readonly FurnitureType SimpleBench
    Field Value
    Type Description
    FurnitureType

    SimpleBookshelf

    Declaration
    public static readonly FurnitureType SimpleBookshelf
    Field Value
    Type Description
    FurnitureType

    SimpleCeilingLamp

    Declaration
    public static readonly FurnitureType SimpleCeilingLamp
    Field Value
    Type Description
    FurnitureType

    SimpleChair

    Declaration
    public static readonly FurnitureType SimpleChair
    Field Value
    Type Description
    FurnitureType

    SimpleCounter

    Declaration
    public static readonly FurnitureType SimpleCounter
    Field Value
    Type Description
    FurnitureType

    SimpleDesk

    Declaration
    public static readonly FurnitureType SimpleDesk
    Field Value
    Type Description
    FurnitureType

    SimpleDrawer

    Declaration
    public static readonly FurnitureType SimpleDrawer
    Field Value
    Type Description
    FurnitureType

    SimpleEasel

    Declaration
    public static readonly FurnitureType SimpleEasel
    Field Value
    Type Description
    FurnitureType

    SimpleLamp

    Declaration
    public static readonly FurnitureType SimpleLamp
    Field Value
    Type Description
    FurnitureType

    SimpleLowTable

    Declaration
    public static readonly FurnitureType SimpleLowTable
    Field Value
    Type Description
    FurnitureType

    SimpleOpenShower

    Declaration
    public static readonly FurnitureType SimpleOpenShower
    Field Value
    Type Description
    FurnitureType

    SimplePicnicTable

    Declaration
    public static readonly FurnitureType SimplePicnicTable
    Field Value
    Type Description
    FurnitureType

    SimpleShower

    Declaration
    public static readonly FurnitureType SimpleShower
    Field Value
    Type Description
    FurnitureType

    SimpleSofa

    Declaration
    public static readonly FurnitureType SimpleSofa
    Field Value
    Type Description
    FurnitureType

    SimpleStoneWall

    Declaration
    public static readonly FurnitureType SimpleStoneWall
    Field Value
    Type Description
    FurnitureType

    SimpleToilet

    Declaration
    public static readonly FurnitureType SimpleToilet
    Field Value
    Type Description
    FurnitureType

    SimpleWallSink

    Declaration
    public static readonly FurnitureType SimpleWallSink
    Field Value
    Type Description
    FurnitureType

    SmallBarbecue

    Declaration
    public static readonly FurnitureType SmallBarbecue
    Field Value
    Type Description
    FurnitureType

    SmallBlinds

    Declaration
    public static readonly FurnitureType[] SmallBlinds
    Field Value
    Type Description
    FurnitureType[]

    SmallBush

    Declaration
    public static readonly FurnitureType SmallBush
    Field Value
    Type Description
    FurnitureType

    SmallCandlestick

    Declaration
    public static readonly FurnitureType SmallCandlestick
    Field Value
    Type Description
    FurnitureType

    SmallChimney

    Declaration
    public static readonly FurnitureType SmallChimney
    Field Value
    Type Description
    FurnitureType

    SmallMirror

    Declaration
    public static readonly FurnitureType SmallMirror
    Field Value
    Type Description
    FurnitureType

    SmallPicnicTable

    Declaration
    public static readonly FurnitureType SmallPicnicTable
    Field Value
    Type Description
    FurnitureType

    SmallPlant

    Declaration
    public static readonly FurnitureType SmallPlant
    Field Value
    Type Description
    FurnitureType

    SmallRocks

    Declaration
    public static readonly FurnitureType SmallRocks
    Field Value
    Type Description
    FurnitureType

    SmallShovel

    Declaration
    public static readonly FurnitureType SmallShovel
    Field Value
    Type Description
    FurnitureType

    SmallSimpleCurtain

    Declaration
    public static readonly FurnitureType SmallSimpleCurtain
    Field Value
    Type Description
    FurnitureType

    Spanner

    Declaration
    public static readonly FurnitureType Spanner
    Field Value
    Type Description
    FurnitureType

    Sponge

    Declaration
    public static readonly FurnitureType Sponge
    Field Value
    Type Description
    FurnitureType

    SquareDinnerTable

    Declaration
    public static readonly FurnitureType SquareDinnerTable
    Field Value
    Type Description
    FurnitureType

    SquarePlantPots

    Declaration
    public static readonly FurnitureType[] SquarePlantPots
    Field Value
    Type Description
    FurnitureType[]

    StandingCoatRack

    Declaration
    public static readonly FurnitureType StandingCoatRack
    Field Value
    Type Description
    FurnitureType

    StandingDesk

    Declaration
    public static readonly FurnitureType StandingDesk
    Field Value
    Type Description
    FurnitureType

    StorageBoxSeat

    Declaration
    public static readonly FurnitureType StorageBoxSeat
    Field Value
    Type Description
    FurnitureType

    StreetLamps

    Declaration
    public static readonly FurnitureType[] StreetLamps
    Field Value
    Type Description
    FurnitureType[]

    Succulents

    Declaration
    public static readonly FurnitureType[] Succulents
    Field Value
    Type Description
    FurnitureType[]

    SwirlWoodworkingLamp

    Declaration
    public static readonly FurnitureType SwirlWoodworkingLamp
    Field Value
    Type Description
    FurnitureType

    TallCountryFence

    Declaration
    public static readonly FurnitureType TallCountryFence
    Field Value
    Type Description
    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 ColorMap entries (or multiple ColorSchemes), additional texture regions will automatically be created to the right of the original texture region.

    Declaration
    public readonly IDictionary<Direction2, TextureRegion[]> Textures
    Field Value
    Type Description
    System.Collections.Generic.IDictionary<MLEM.Misc.Direction2, MLEM.Textures.TextureRegion[]>

    TinyDinnerTable

    Declaration
    public static readonly FurnitureType TinyDinnerTable
    Field Value
    Type Description
    FurnitureType

    ToyCar

    Declaration
    public static readonly FurnitureType ToyCar
    Field Value
    Type Description
    FurnitureType

    TraditionalBar

    Declaration
    public static readonly FurnitureType TraditionalBar
    Field Value
    Type Description
    FurnitureType

    TraditionalBedsideLamp

    Declaration
    public static readonly FurnitureType TraditionalBedsideLamp
    Field Value
    Type Description
    FurnitureType

    TraditionalCounter

    Declaration
    public static readonly FurnitureType TraditionalCounter
    Field Value
    Type Description
    FurnitureType

    TraditionalFireplace

    Declaration
    public static readonly FurnitureType TraditionalFireplace
    Field Value
    Type Description
    FurnitureType

    Treadmill

    Declaration
    public static readonly FurnitureType Treadmill
    Field Value
    Type Description
    FurnitureType

    TreeStumps

    Declaration
    public static readonly FurnitureType[] TreeStumps
    Field Value
    Type Description
    FurnitureType[]

    Types

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

    Declaration
    public static readonly ReadOnlyDictionary<string, FurnitureType> Types
    Field Value
    Type Description
    System.Collections.ObjectModel.ReadOnlyDictionary<System.String, FurnitureType>

    UnfinishedWoodwork

    Declaration
    public static readonly FurnitureType UnfinishedWoodwork
    Field Value
    Type Description
    FurnitureType

    UnpreparedFood

    Declaration
    public static readonly FurnitureType UnpreparedFood
    Field Value
    Type Description
    FurnitureType

    Vases

    Declaration
    public static readonly FurnitureType[] Vases
    Field Value
    Type Description
    FurnitureType[]

    VerticalDumbbellRack

    Declaration
    public static readonly FurnitureType VerticalDumbbellRack
    Field Value
    Type Description
    FurnitureType

    WindowPlants

    Declaration
    public static readonly FurnitureType[] WindowPlants
    Field Value
    Type Description
    FurnitureType[]

    Wisteria

    Declaration
    public static readonly FurnitureType[] Wisteria
    Field Value
    Type Description
    FurnitureType[]

    WoodenPowerPole

    Declaration
    public static readonly FurnitureType WoodenPowerPole
    Field Value
    Type Description
    FurnitureType

    WoodenPowerPoleLine

    Declaration
    public static readonly FurnitureType WoodenPowerPoleLine
    Field Value
    Type Description
    FurnitureType

    WoodenStool

    Declaration
    public static readonly FurnitureType WoodenStool
    Field Value
    Type Description
    FurnitureType

    WoodenToyBox

    Declaration
    public static readonly FurnitureType WoodenToyBox
    Field Value
    Type Description
    FurnitureType

    WoodworkingChair

    Declaration
    public static readonly FurnitureType WoodworkingChair
    Field Value
    Type Description
    FurnitureType

    WoodworkingChairArmrests

    Declaration
    public static readonly FurnitureType WoodworkingChairArmrests
    Field Value
    Type Description
    FurnitureType

    WoodworkingCloset

    Declaration
    public static readonly FurnitureType WoodworkingCloset
    Field Value
    Type Description
    FurnitureType

    WoodworkingTable

    Declaration
    public static readonly FurnitureType WoodworkingTable
    Field Value
    Type Description
    FurnitureType

    WorkoutPosters

    Declaration
    public static readonly FurnitureType[] WorkoutPosters
    Field Value
    Type Description
    FurnitureType[]

    Properties

    Rotations

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

    Declaration
    public ICollection<Direction2> Rotations { get; }
    Property Value
    Type Description
    System.Collections.Generic.ICollection<MLEM.Misc.Direction2>

    SourceString

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

    Declaration
    public string SourceString { get; }
    Property Value
    Type Description
    System.String

    Methods

    Construct(Int32[], Map, Vector2, Nullable<Guid>)

    Constructs a new Furniture object from this furniture type

    Declaration
    public Furniture Construct(int[] colors, Map map, Vector2 pos, Guid? id = null)
    Parameters
    Type Name Description
    System.Int32[] colors

    The indices of the colors that the furniture should have

    Map map

    The map that the furniture should be added to

    Vector2 pos

    The position that the furniture should have

    System.Nullable<System.Guid> id

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

    Returns
    Type Description
    Furniture

    A new furniture instance of this type

    DrawColumns(Map, Vector2, SpriteBatch, Vector2, Direction2, TextureRegion, Color, Single, Boolean, ParentInfo, Single, Boolean, SpriteEffects)

    This method is a semi-overload of DrawColumns(Map, Vector2, SpriteBatch, Vector2, TextureRegion, Color, Single, Point, Boolean, ParentInfo, Single, SpriteEffects, Boolean, Boolean, Boolean) that additionally calculates some values required for rendering furniture with certain ObjectCategory values correctly

    Declaration
    public void DrawColumns(Map map, Vector2 position, SpriteBatch batch, Vector2 drawPos, Direction2 rotation, TextureRegion texture, Color color, float scale, bool pivot = true, ParentInfo parent = default(ParentInfo), float depthOffset = 0F, bool held = false, SpriteEffects effects = null)
    Parameters
    Type Name Description
    Map map

    The map that the object is on

    Vector2 position

    The position that the object is on, in world space

    SpriteBatch batch

    The sprite batch to draw with

    Vector2 drawPos

    The position to draw at, in draw space

    MLEM.Misc.Direction2 rotation

    The rotation that this object has, used for some calculations

    MLEM.Textures.TextureRegion texture

    The texture region to draw

    Color color

    The color to draw with

    System.Single scale

    The scale to draw at

    System.Boolean pivot

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

    ParentInfo parent

    The object's parent object

    System.Single depthOffset

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

    System.Boolean held

    Whether this object is currently being held by a Person

    SpriteEffects effects

    The sprite effects to use when rendering

    DrawDirtyOverlay(Map, Vector2, SpriteBatch, Vector2, Direction2, Single, Nullable<Color>, Boolean, ParentInfo, Single, Boolean)

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

    Declaration
    public void DrawDirtyOverlay(Map map, Vector2 position, SpriteBatch batch, Vector2 drawPos, Direction2 rotation, float scale, Color? overrideColor = null, bool pivot = true, ParentInfo parent = default(ParentInfo), float depthOffset = 0F, bool held = false)
    Parameters
    Type Name Description
    Map map

    The map that the object is on

    Vector2 position

    The position that the object is on, in world space

    SpriteBatch batch

    The sprite batch to draw with

    Vector2 drawPos

    The position to draw at, in draw space

    MLEM.Misc.Direction2 rotation

    The rotation that this object has, used for some calculations

    System.Single scale

    The scale to draw at

    System.Nullable<Color> overrideColor

    An optional color to override the default colors of the furniture

    System.Boolean pivot

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

    ParentInfo parent

    The object's parent object

    System.Single depthOffset

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

    System.Boolean held

    Whether this object is currently being held by a Person

    DrawLayers(Map, Vector2, SpriteBatch, Vector2, Direction2, TextureRegion[], Int32[], Single, Boolean, ParentInfo, Nullable<Color>, Single, Boolean)

    Draws the furniture type with the given data. Internally, this uses DrawColumns(Map, Vector2, SpriteBatch, Vector2, Direction2, TextureRegion, Color, Single, Boolean, ParentInfo, Single, Boolean, SpriteEffects) to draw each layer with a slight depth offset.

    Declaration
    public void DrawLayers(Map map, Vector2 position, SpriteBatch batch, Vector2 drawPos, Direction2 rotation, TextureRegion[] layers, int[] colors, float scale, bool pivot = true, ParentInfo parent = default(ParentInfo), Color? overrideColor = null, float depthOffset = 0F, bool held = false)
    Parameters
    Type Name Description
    Map map

    The map to draw the furniture type on

    Vector2 position

    The position on the map that the furniture is at

    SpriteBatch batch

    The sprite batch used for drawing

    Vector2 drawPos

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

    MLEM.Misc.Direction2 rotation

    The rotation of the furniture

    MLEM.Textures.TextureRegion[] layers

    The textures to draw this furniture with

    System.Int32[] colors

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

    System.Single scale

    The scale that the furniture should be drawn with

    System.Boolean pivot

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

    ParentInfo parent

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

    System.Nullable<Color> overrideColor

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

    System.Single depthOffset

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

    System.Boolean held

    Whether or not this item is currently being held by a Person

    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.

    Declaration
    public Direction2 GetBestRotation(Direction2 goal)
    Parameters
    Type Name Description
    MLEM.Misc.Direction2 goal

    The goal rotation

    Returns
    Type Description
    MLEM.Misc.Direction2

    The closest possible rotation to the goal rotation

    GetConstructedType()

    Returns the System.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.

    Declaration
    public Type GetConstructedType()
    Returns
    Type Description
    System.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.

    Declaration
    public static Rectangle GetCoveredTiles(Vector2 pos, Point size)
    Parameters
    Type Name Description
    Vector2 pos

    The position to place the furniture at

    Point size

    The size of the furniture

    Returns
    Type Description
    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.

    Declaration
    public string GetDisplayName(Furniture instance)
    Parameters
    Type Name Description
    Furniture instance

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

    Returns
    Type Description
    System.String

    This furniture item's display name.

    GetPrice()

    Returns the price that this object can be bought or sold for. Note that, like in the case of the Painting, the returned price isn't necessarily the full price that the object can be sold for. Instead, the price returned here should be the price that this object has when bought or sold from the FurnitureTool or similar.

    Declaration
    public float GetPrice()
    Returns
    Type Description
    System.Single

    The object's price

    GetReferenceTexture(Nullable<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.

    Declaration
    public TextureRegion GetReferenceTexture(Direction2? rotation = null)
    Parameters
    Type Name Description
    System.Nullable<MLEM.Misc.Direction2> rotation

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

    Returns
    Type Description
    MLEM.Textures.TextureRegion

    The reference texture for the given rotation

    GetRoofingInTheWay(Map, Vector2, Direction2, ICollection<Roof>)

    Returns a set of roofing that would be in the way if this furniture type was placed at the given position with the given rotation. Note that, if this furniture type does not have the ObstructedByRoofs category, no roofs will be returned.

    Declaration
    public IEnumerable<Roof> GetRoofingInTheWay(Map map, Vector2 pos, Direction2 rotation, ICollection<Roof> possibleAdditionalRoofs = null)
    Parameters
    Type Name Description
    Map map

    The map to place the furniture on

    Vector2 pos

    The position that the furniture should be placed at

    MLEM.Misc.Direction2 rotation

    The rotation that the furniture should have

    System.Collections.Generic.ICollection<Roof> possibleAdditionalRoofs

    A set of roofs that have not been placed yet, but might also be in the way.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Roof>

    A set of roofing that would be in the way

    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.

    Declaration
    public Vector2 GetRotatedOffset(Vector2 offset, Direction2 objectRotation, Direction2 rotation)
    Parameters
    Type Name Description
    Vector2 offset

    The offset position to rotate

    MLEM.Misc.Direction2 objectRotation

    The original rotation of the object

    MLEM.Misc.Direction2 rotation

    The rotation to rotate by

    Returns
    Type Description
    Vector2

    The rotated offset of the offset

    GetSize(Direction2)

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

    Declaration
    public Point GetSize(Direction2 rotation)
    Parameters
    Type Name Description
    MLEM.Misc.Direction2 rotation

    The rotation to return the size for

    Returns
    Type Description
    Point

    The modified size

    GetTexture(String, Boolean)

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

    Declaration
    public static TextureRegion GetTexture(string name, bool throwIfNotFound = true)
    Parameters
    Type Name Description
    System.String name

    The name of the texture to get

    System.Boolean throwIfNotFound

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

    Returns
    Type Description
    MLEM.Textures.TextureRegion

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

    GetTextures(String, Int32, Func<Direction2, Boolean>)

    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.

    Declaration
    public static Dictionary<Direction2, TextureRegion[]> GetTextures(string name, int amount = 1, Func<Direction2, bool> shouldThrow = null)
    Parameters
    Type Name Description
    System.String name

    The name of the texture to load

    System.Int32 amount

    The amount of layers the texture has

    System.Func<MLEM.Misc.Direction2, System.Boolean> shouldThrow

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

    Returns
    Type Description
    System.Collections.Generic.Dictionary<MLEM.Misc.Direction2, MLEM.Textures.TextureRegion[]>

    A dictionary of directions to texture layers

    GetWallsInTheWay(Map, Vector2, Direction2, ICollection<Wall>)

    Returns a set of walls that would be in the way if this furniture type was placed at the given position with the given rotation

    Declaration
    public IEnumerable<Wall> GetWallsInTheWay(Map map, Vector2 pos, Direction2 rotation, ICollection<Wall> possibleAdditionalWalls = null)
    Parameters
    Type Name Description
    Map map

    The map to place the furniture on

    Vector2 pos

    The position that the furniture should be placed at

    MLEM.Misc.Direction2 rotation

    The rotation that the furniture should have

    System.Collections.Generic.ICollection<Wall> possibleAdditionalWalls

    A set of walls that have not been placed yet, but might also be in the way.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Wall>

    A set of walls that would be in the way

    HasCategory(ObjectCategory)

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

    Declaration
    public bool HasCategory(ObjectCategory category)
    Parameters
    Type Name Description
    ObjectCategory category

    The categories to query

    Returns
    Type Description
    System.Boolean

    Whether any of the passed categories are present

    Register(FurnitureType.TypeSettings)

    Registers a custom furniture type

    Declaration
    public static FurnitureType Register(FurnitureType.TypeSettings settings)
    Parameters
    Type Name Description
    FurnitureType.TypeSettings settings

    The settings to apply to the custom furniture type

    Returns
    Type Description
    FurnitureType

    The registered furniture type

    RegisterAll(IEnumerable<FurnitureType.TypeSettings>)

    Registers a set of custom furniture type and returns them

    Declaration
    public static FurnitureType[] RegisterAll(IEnumerable<FurnitureType.TypeSettings> settings)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<FurnitureType.TypeSettings> settings

    The settings to apply to the custom furniture type

    Returns
    Type Description
    FurnitureType[]

    The registered furniture types

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Implements

    MLEM.Misc.IGenericDataHolder
    IPricedObject
    IEmotionSource

    Extension Methods

    Extensions.JsonCopy<T>(T)
    ☀
    ☾
    In This Article
    Back to top
    © 2021-2022 Ellpeck – Impressum – Privacy – Status
    ☀
    ☾