Table of Contents

Class Gravestone

Namespace
TinyLife.Objects
Assembly
Tiny Life.dll

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 : Furniture, IGenericDataHolder
Inheritance
JsonTypeSafeGenericDataHolder
Gravestone
Implements
IGenericDataHolder
Inherited Members
JsonTypeSafeGenericDataHolder.GetDataKeys()
Extension Methods

Constructors

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

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

public Gravestone(Guid id, FurnitureType type, int[] colors, Map map, Vector2 pos)

Parameters

id Guid

The id to apply to the created furniture instance

type FurnitureType

The type to create an instance of

colors int[]

The colors to apply to the furniture

map Map

The map to create the furniture on

pos Vector2

The position that the furniture should have

Fields

Reason

The DeathReason for this gravestone's DeadPerson's death

[DataMember]
public DeathReason Reason

Field Value

DeathReason

Properties

DeadPerson

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

public Person DeadPerson { get; set; }

Property Value

Person

Methods

GetDescription(List<string>, bool)

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.

public override void GetDescription(List<string> description, bool forHoverInfo)

Parameters

description List<string>

The description to add to.

forHoverInfo bool

Whether this method is being called by GetHoverInfo(Tooltip) (or by build mode).

GetPathCostModifier(Point)

Returns a modifier that indicates the "cost" for pathfinding over this object. If this object is a Furniture object, it has to have the NonColliding category for the returned value to have an effect. Note that, if this object moves, MarkDirtyForPathfinding(Point) should be invoked for its previous and resulting Position. By default, this method returns 0, meaning no additional pathfinding cost is added.

public override float GetPathCostModifier(Point position)

Parameters

position Point

The position whose path cost modifier is being calculated.

Returns

float

This object's path cost modifier for the given position