Gravestone - Ellpeck/TinyLifeExampleMod Wiki

Tiny Life

TinyLife.Objects

Gravestone Class

A furniture is an instance of a FurnitureType which is placed in the world, or in a Person's hand.
To register a custom furniture, use Register(TypeSettings).

public class Gravestone : TinyLife.Objects.Furniture

Inheritance System.Object 🡒 MLEM.Misc.GenericDataHolder 🡒 MapObject 🡒 Furniture 🡒 Gravestone

Constructors

Gravestone.Gravestone(Guid, FurnitureType, int[], Map, Vector2) Constructor

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

public Gravestone(System.Guid id, TinyLife.Objects.FurnitureType type, int[] colors, TinyLife.World.Map map, Microsoft.Xna.Framework.Vector2 pos);

Parameters

id System.Guid
The id to apply to the created furniture instance

type FurnitureType
The type to create an instance of

colors System.Int32[]
The colors to apply to the furniture

map Map
The map to create the furniture on

pos Microsoft.Xna.Framework.Vector2
The position that the furniture should have

Fields

Gravestone.Reason Field

The DeathReason for this gravestone's DeadPerson's death

public DeathReason Reason;

Field Value

DeathReason

Properties

Gravestone.DeadPerson Property

The Person that is "stored" in this gravestone.
Note that the actual dead person is stored in GetDeadPerson(Guid).

public TinyLife.Objects.Person DeadPerson { get; set; }

Property Value

Person

Methods

Gravestone.GetHoverInfo() Method

Returns a MLEM.Ui.Elements.Tooltip object that is displayed whenever the mouse is hovered over this object in the world.
By default, this method returns null, which will cause no tooltip to be displayed.

public override MLEM.Ui.Elements.Tooltip GetHoverInfo();

Returns

MLEM.Ui.Elements.Tooltip
The tooltip to display