Class MemoryType
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
stringThe name of this memory type.
constructedType
TypeThe type of Memory to construct, or null to construct the default type Memory.
Fields
AskedForFood
public static readonly MemoryType AskedForFood
Field Value
ConstructedType
The type of Memory constructed in Construct<T>(ActionInfo, TimeSpan), or null to construct the default type.
public readonly Type ConstructedType
Field Value
FamilySocial
public static readonly MemoryType FamilySocial
Field Value
FoundOutPregnancy
public static readonly MemoryType FoundOutPregnancy
Field Value
FoundOutReproductiveAbilities
public static readonly MemoryType FoundOutReproductiveAbilities
Field Value
GotDrunk
public static readonly MemoryType GotDrunk
Field Value
HadAbortion
public static readonly MemoryType HadAbortion
Field Value
HadChild
public static readonly MemoryType HadChild
Field Value
HadFirstKiss
public static readonly MemoryType HadFirstKiss
Field Value
MayBePregnant
public static readonly MemoryType MayBePregnant
Field Value
Name
The name of this memory type.
public readonly string Name
Field Value
PromotionOrRaise
public static readonly MemoryType PromotionOrRaise
Field Value
PublishFailure
public static readonly MemoryType PublishFailure
Field Value
Slept
public static readonly MemoryType Slept
Field Value
SocialAction
public static readonly MemoryType SocialAction
Field Value
ToldAboutPregnancy
public static readonly MemoryType ToldAboutPregnancy
Field Value
Types
The memory types that are registered, both by the game itself, and by mods.
public static readonly ReadOnlyDictionary<string, MemoryType> Types
Field Value
WasOutside
public static readonly MemoryType WasOutside
Field Value
WasRomanticWithSomeoneElse
public static readonly MemoryType WasRomanticWithSomeoneElse
Field Value
Properties
ActionDone
public static Dictionary<ActionType, MemoryType> ActionDone { get; }
Property Value
AteFood
public static Dictionary<FoodType, MemoryType> AteFood { get; }
Property Value
SourceString
A (localized) string that is displayed when hovering over an EmotionModifier that has this source
public string SourceString { get; }
Property Value
UpgradeLearned
public static Dictionary<Upgrade, MemoryType> UpgradeLearned { get; }
Property Value
UsedFurniture
public static Dictionary<ObjectCategory, MemoryType> UsedFurniture { get; }
Property Value
UsedSkillCategory
public static Dictionary<SkillCategory, MemoryType> UsedSkillCategory { get; }
Property Value
WorkedAtJob
public static Dictionary<JobType, MemoryType> WorkedAtJob { get; }
Property Value
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
ActionInfoThe ActionInfo that contains information about this memory.
timeOccured
TimeSpanThe 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
MemoryTypeThe type of memory to register.
Returns
- MemoryType
The passed memory type
type
, for chaining.