Class Gravestone
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
-
JsonTypeSafeGenericDataHolderGravestone
- 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
GuidThe id to apply to the created furniture instance
type
FurnitureTypeThe type to create an instance of
colors
int[]The colors to apply to the furniture
map
MapThe map to create the furniture on
pos
Vector2The position that the furniture should have
Fields
Reason
The DeathReason for this gravestone's DeadPerson's death
[DataMember]
public DeathReason Reason
Field Value
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
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
boolWhether 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
PointThe position whose path cost modifier is being calculated.
Returns
- float
This object's path cost modifier for the given
position