Table of Contents

Class SeedBag

Namespace
TinyLife.Objects
Assembly
TinyLife.dll
public class SeedBag : Furniture, IGenericDataHolder, IContainerObject<Stacked<PlantType>>
Inheritance
JsonTypeSafeGenericDataHolder
SeedBag
Implements
IGenericDataHolder
Inherited Members
JsonTypeSafeGenericDataHolder.GetDataKeys()
Extension Methods

Constructors

SeedBag(Guid, FurnitureType, int[], Map, Vector2, float)

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

Parameters

id Guid
type FurnitureType
colors int[]
map Map
pos Vector2
floor float

Properties

Content

public IEnumerable<Stacked<PlantType>> Content { get; }

Property Value

IEnumerable<Stacked<PlantType>>

Methods

AddContent(Stacked<PlantType>)

public bool AddContent(Stacked<PlantType> content)

Parameters

content Stacked<PlantType>

Returns

bool

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).

RemoveContent(Stacked<PlantType>)

public bool RemoveContent(Stacked<PlantType> content)

Parameters

content Stacked<PlantType>

Returns

bool

Validate(AppliedMigrations)

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.

public override bool Validate(AppliedMigrations appliedMigrations)

Parameters

appliedMigrations AppliedMigrations

Returns

bool

false if the object is not valid, true otherwise