Table of Contents

Class MemoryType

Namespace
TinyLife.Goals
Assembly
Tiny Life.dll

A memory type is a set of information for a Memory to have. Please note that all collections of specific memories, like ActionDone, are only initialized in the finalization stage (see FinalizeGameContent(GameImpl, ModInfo)).

[JsonConverter(typeof(MigratingStaticJsonConverter<MemoryType>), new object[] { typeof(MemoryType), "PrivateTypes", false })]
public class MemoryType : IEmotionSource
Inheritance
MemoryType
Implements
Inherited Members
Extension Methods

Constructors

MemoryType(string, Type)

Creates a new memory type with the given name.

public MemoryType(string name, Type constructedType = null)

Parameters

name string

The name of this memory type.

constructedType Type

The type of Memory to construct, or null to construct the default type Memory.

Fields

AskedForFood

public static readonly MemoryType AskedForFood

Field Value

MemoryType

ConstructedType

The type of Memory constructed in Construct<T>(ActionInfo, TimeSpan), or null to construct the default type.

public readonly Type ConstructedType

Field Value

Type

FamilySocial

public static readonly MemoryType FamilySocial

Field Value

MemoryType

FoundOutPregnancy

public static readonly MemoryType FoundOutPregnancy

Field Value

MemoryType

FoundOutReproductiveAbilities

public static readonly MemoryType FoundOutReproductiveAbilities

Field Value

MemoryType

GotDrunk

public static readonly MemoryType GotDrunk

Field Value

MemoryType

HadAbortion

public static readonly MemoryType HadAbortion

Field Value

MemoryType

HadChild

public static readonly MemoryType HadChild

Field Value

MemoryType

HadFirstKiss

public static readonly MemoryType HadFirstKiss

Field Value

MemoryType

MayBePregnant

public static readonly MemoryType MayBePregnant

Field Value

MemoryType

Name

The name of this memory type.

public readonly string Name

Field Value

string

PromotionOrRaise

public static readonly MemoryType PromotionOrRaise

Field Value

MemoryType

PublishFailure

public static readonly MemoryType PublishFailure

Field Value

MemoryType

Slept

public static readonly MemoryType Slept

Field Value

MemoryType

SocialAction

public static readonly MemoryType SocialAction

Field Value

MemoryType

ToldAboutPregnancy

public static readonly MemoryType ToldAboutPregnancy

Field Value

MemoryType

Types

The memory types that are registered, both by the game itself, and by mods.

public static readonly ReadOnlyDictionary<string, MemoryType> Types

Field Value

ReadOnlyDictionary<string, MemoryType>

WasOutside

public static readonly MemoryType WasOutside

Field Value

MemoryType

WasRomanticWithSomeoneElse

public static readonly MemoryType WasRomanticWithSomeoneElse

Field Value

MemoryType

Properties

ActionDone

public static Dictionary<ActionType, MemoryType> ActionDone { get; }

Property Value

Dictionary<ActionType, MemoryType>

AteFood

public static Dictionary<FoodType, MemoryType> AteFood { get; }

Property Value

Dictionary<FoodType, MemoryType>

SourceString

A (localized) string that is displayed when hovering over an EmotionModifier that has this source

public string SourceString { get; }

Property Value

string

UpgradeLearned

public static Dictionary<Upgrade, MemoryType> UpgradeLearned { get; }

Property Value

Dictionary<Upgrade, MemoryType>

UsedFurniture

public static Dictionary<ObjectCategory, MemoryType> UsedFurniture { get; }

Property Value

Dictionary<ObjectCategory, MemoryType>

UsedSkillCategory

public static Dictionary<SkillCategory, MemoryType> UsedSkillCategory { get; }

Property Value

Dictionary<SkillCategory, MemoryType>

WorkedAtJob

public static Dictionary<JobType, MemoryType> WorkedAtJob { get; }

Property Value

Dictionary<JobType, MemoryType>

Methods

Construct<T>(ActionInfo, TimeSpan)

Constructs a new Memory from this memory type.

public T Construct<T>(ActionInfo info, TimeSpan timeOccured) where T : Memory

Parameters

info ActionInfo

The ActionInfo that contains information about this memory.

timeOccured TimeSpan

The time that this memory occured.

Returns

T

The constructed memory.

Type Parameters

T

Exceptions

ArgumentException

Thrown if constructing the ConstructedType fails.

Register(MemoryType)

Registers the given MemoryType to the Types registry.

public static MemoryType Register(MemoryType type)

Parameters

type MemoryType

The type of memory to register.

Returns

MemoryType

The passed memory type type, for chaining.