Search Results for

    Show / Hide Table of Contents

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

    Inheritance
    System.Object
    MLEM.Data.Json.JsonTypeSafeGenericDataHolder
    MapObject
    Furniture
    Painting
    Implements
    MLEM.Misc.IGenericDataHolder
    IPricedObject
    Inherited Members
    Furniture.Random
    Furniture.OnGetDescription
    Furniture.OnSetCreator
    Furniture.OnGetDirty
    Furniture.OnDirty
    Furniture.DisplayName
    Furniture.ParentInfo
    Furniture.Visibility
    Furniture.Type
    Furniture.Rotation
    Furniture.ParentFurniture
    Furniture.ParentObjectSpot
    Furniture.HasParent
    Furniture.Colors
    Furniture.Area
    Furniture.DevaluedThroughUse
    Furniture.AreUtilitiesDisabled
    Furniture.IsStatic
    Furniture.CreatorId
    Furniture.Quality
    Furniture.CanBeDirty
    Furniture.Dirty
    Furniture.CustomPrice
    Furniture.Creator
    Furniture.AttachedWall
    Furniture.HideFromDraw
    Furniture.VisualRotation
    Furniture.Draw(GameTime, Object, Vector2, Nullable<Color>, List<StaticSpriteBatch.Item>)
    Furniture.Intersects(RectangleF)
    Furniture.GetCategories(Person)
    Furniture.OnAdded()
    Furniture.OnRemoved()
    Furniture.GetAiPriority(Person, ObjectCategory)
    Furniture.CanExecuteAction(ActionType, ActionInfo, Boolean, Boolean)
    Furniture.OnActionCompleted(Action, CompletionType, Boolean)
    Furniture.ActionUpdate(Action, GameTime, TimeSpan, Single, Boolean)
    Furniture.GetFreeActionSpotInfo(Person, ObjectCategory)
    Furniture.GetHoverInfo(Tooltip)
    Furniture.GetEfficiencyModifier(Person, ActionInfo, Boolean, SkillType, Single)
    Furniture.GetRestoreNeedModifier(Person, ActionInfo, Boolean, NeedType)
    Furniture.IsFreeSpot(Point)
    Furniture.ResetToStatic(Boolean)
    Furniture.GetDecorativeRating(Room)
    Furniture.GetDirty(Person, TimeSpan)
    Furniture.SetCreator(Person, Boolean)
    Furniture.OnPlacedInBuildMode(FurniturePlacer, Boolean)
    Furniture.OnNeighborChanged(Furniture)
    Furniture.DrawUi(GameTime, SpriteBatch, Element, Single, Int32[])
    Furniture.GetOccupants(ObjectCategory, Boolean)
    Furniture.GetFreeActionSpots(Person, ObjectCategory)
    Furniture.GetFreeActionSpot(Person, ObjectCategory)
    Furniture.GetActionSpotInfo(Person, ActionSpot, Direction2)
    Furniture.GetFreeObjectSpot(FurnitureType, Nullable<Vector2>)
    Furniture.SetParent(Furniture, ObjectSpot)
    Furniture.UnlinkParentsAndChildren()
    Furniture.RemoveAndUnlink()
    Furniture.GetChildren<T>()
    Furniture.RemoveChildren<T>(Predicate<T>)
    Furniture.RemoveChild(Furniture)
    Furniture.AddChild<T>(FurnitureType, Direction2, Int32[], Nullable<Guid>, Nullable<Vector2>)
    Furniture.AddChild(Furniture, Direction2, Nullable<Vector2>)
    Furniture.SetChild<T>(ObjectSpot, FurnitureType, Direction2, Int32[], Nullable<Guid>)
    Furniture.SetChild(ObjectSpot, Furniture, Direction2)
    Furniture.NotifyNeighbors()
    Furniture.SetNewId(IEnumerable<Furniture>)
    MapObject.PersonRotationOrder
    MapObject.OnCreated
    MapObject.OnValidated
    MapObject.OnEventsAttachable
    MapObject.OnDraw
    MapObject.OnUpdate
    MapObject.OnGetHoverInfo
    MapObject.Position
    MapObject.Id
    MapObject.Map
    MapObject.CurrentLot
    MapObject.CurrentRoom
    MapObject.IsInWorld
    MapObject.OnCameraRotationChanged(Direction2, Direction2)
    MapObject.SetMapAndValidate(Map)
    MapObject.HasCategory(Person, ObjectCategory)
    MapObject.GetPathCostModifier(Point)
    MapObject.DoDraw(GameTime, Object, Nullable<Color>, Boolean, List<StaticSpriteBatch.Item>)
    MapObject.DoUpdate(GameTime, TimeSpan, Single)
    MapObject.DrawColumns(Map, Vector2, Object, Vector2, TextureRegion, Color, Single, Point, List<StaticSpriteBatch.Item>, Boolean, ParentInfo, Single, SpriteEffects, Boolean, Boolean, Boolean)
    MapObject.GetModCategory(String)
    MLEM.Data.Json.JsonTypeSafeGenericDataHolder.SetData(System.String, System.Object)
    MLEM.Data.Json.JsonTypeSafeGenericDataHolder.SetData<T>(System.String, T)
    MLEM.Data.Json.JsonTypeSafeGenericDataHolder.GetData<T>(System.String)
    MLEM.Data.Json.JsonTypeSafeGenericDataHolder.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)
    System.Object.ToString()
    Namespace: TinyLife.Objects
    Assembly: Tiny Life.dll
    Syntax
    public class Painting : Furniture, IGenericDataHolder, IPricedObject

    Constructors

    Painting(Guid, FurnitureType, Int32[], Map, Vector2)

    Creates a new furniture instance. By default, this is done using Construct<T>(Int32[], Map, Vector2, Nullable<Guid>).

    Declaration
    public Painting(Guid id, FurnitureType type, int[] colors, Map map, Vector2 pos)
    Parameters
    Type Name Description
    System.Guid id

    The id to apply to the created furniture instance

    FurnitureType type

    The type to create an instance of

    System.Int32[] colors

    The colors to apply to the furniture

    Map map

    The map to create the furniture on

    Microsoft.Xna.Framework.Vector2 pos

    The position that the furniture should have

    Fields

    EmitsCreativeEmotion

    Stores whether this painting emits a Creative EmotionModifier when people are in the same room as it. This field is used by the PerfectPainter award personality.

    Declaration
    [DataMember]
    public bool EmitsCreativeEmotion
    Field Value
    Type Description
    System.Boolean

    PaintingType

    The type of painting that this object displays

    Declaration
    [DataMember]
    public PaintingType PaintingType
    Field Value
    Type Description
    PaintingType

    Progress

    The progress that has been done on this painting by the Creator so far. This value defaults to 1, which is 100%.

    Declaration
    [DataMember]
    public float Progress
    Field Value
    Type Description
    System.Single

    Methods

    Draw(GameTime, Object, Vector2, Vector2, Nullable<Color>, Direction2, Int32[], Single, Boolean, ParentInfo, Single, Boolean, List<StaticSpriteBatch.Item>)

    Draws this furniture in the world with the given settings. This is a more generalized version of Draw(GameTime, Object, Vector2, Nullable<Color>, List<StaticSpriteBatch.Item>)

    Declaration
    public override void Draw(GameTime time, object batch, Vector2 pos, Vector2 drawPos, Color? overrideColor, Direction2 rotation, int[] colors, float drawScale, bool pivot, ParentInfo parent, float depthOffset, bool held, List<StaticSpriteBatch.Item> items)
    Parameters
    Type Name Description
    Microsoft.Xna.Framework.GameTime time

    The game time

    System.Object batch

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

    Microsoft.Xna.Framework.Vector2 pos

    The position, in world space, that the furniture is at

    Microsoft.Xna.Framework.Vector2 drawPos

    The position, in draw space, to draw the furniture at

    System.Nullable<T><Microsoft.Xna.Framework.Color> overrideColor

    An optional color to override the default colors of the furniture

    MLEM.Misc.Direction2 rotation

    The rotation of the furniture

    System.Int32[] colors

    The colors to draw the furniture with

    System.Single drawScale

    The scale to draw the furniture with

    System.Boolean pivot

    Whether or not to move the furniture by its texture's pivot point

    ParentInfo parent

    The object that this furniture is latched on to, or null if there is none

    System.Single depthOffset

    A value that is added onto the calculated depth of the object

    System.Boolean held

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

    System.Collections.Generic.List<T><StaticSpriteBatch.Item> items

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

    Overrides
    Furniture.Draw(GameTime, Object, Vector2, Vector2, Nullable<Color>, Direction2, Int32[], Single, Boolean, ParentInfo, Single, Boolean, List<StaticSpriteBatch.Item>)

    GetDescription(List<String>, Boolean)

    This method allows adding a set of strings to the description list that get displayed when the object is hovered over in the build mode or household storage UIs. By default, this method adds various strings related to the ElectricityRating, Quality, Creator, and also invokes the OnGetDescription event.

    Declaration
    public override void GetDescription(List<string> description, bool forHoverInfo)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T><System.String> description

    The description to add to.

    System.Boolean forHoverInfo
    Overrides
    Furniture.GetDescription(List<String>, Boolean)

    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 override float GetPrice()
    Returns
    Type Description
    System.Single

    The object's price

    Overrides
    Furniture.GetPrice()

    Validate()

    This method is called when this object is loaded from disk. Returning false on this method causes the object to be removed from the map. By default, this method invokes OnValidated and OnEventsAttachable.

    Declaration
    public override bool Validate()
    Returns
    Type Description
    System.Boolean

    false if the object is not valid, true otherwise

    Overrides
    Furniture.Validate()

    Implements

    MLEM.Misc.IGenericDataHolder
    IPricedObject

    Extension Methods

    Extensions.JsonCopy<T>(T)
    ☀
    ☾
    In This Article
    Back to top
    © 2021-2023 Ellpeck Games, Top Hat Studios – Impressum – Privacy – Status
    ☀
    ☾