TinyLifeExampleMod/Api/TinyLife/Emotions/EmotionModifier.md

5.6 KiB

EmotionModifier

Namespace: TinyLife > Emotions

Assembly: Tiny Life.dll

Summary

An emotion modifier stores information about a TinyLife.Objects.Person's current or past actions or events that influenced their TinyLife.Objects.Person.Emotion in some way. Each emotion modifier contributes to the person's emotion, and the emotion modifier with the highest combined TinyLife.Emotions.EmotionModifier.Instance.Amount determines the person's TinyLife.Objects.Person.Emotion. Emotion modifiers can be applied automatically using TinyLife.Emotions.EmotionModifier.Condition or manually using TinyLife.Objects.Person.AddEmotion(TinyLife.Emotions.EmotionModifier,System.Int32,System.TimeSpan).

Constructors

Name Summary
EmotionModifier ( String, TextureRegion, EmotionType, Func<Person, Int32> ) Creates a new emotion modifier with the given settings

Fields

Type Name Summary
Func<Person, Int32> Condition An (optional) condition that has to be met for this emotion modifier to be applied to a person. If this value is non-null, and the value returned by this function is greater than zero, this emotion modifier will be applied to a TinyLife.Objects.Person with the TinyLife.Emotions.EmotionModifier.Instance.Amount set to the return value. If this value is not set, the emotion modifier has to be applied manually using TinyLife.Objects.Person.AddEmotion(TinyLife.Emotions.EmotionModifier,System.Int32,System.TimeSpan).
EmotionType Emotion The TinyLife.Emotions.EmotionType that this emotion modifier causes (if the TinyLife.Emotions.EmotionModifier.Instance.Amount is high enough)
TextureRegion Icon This emotion modifier's icon which will be displayed in the emotions menu
String Name This emotion modifier's name

Static Fields

Type Name Summary
EmotionModifier Asleep
EmotionModifier BadCreation
EmotionModifier BadFood
EmotionModifier BoringWork
EmotionModifier BrokenUpWith
EmotionModifier CaughtBeingInappropriate
EmotionModifier Demoted
EmotionModifier DirtyConversationPartner
EmotionModifier DirtyDishes
EmotionModifier FailedJoke
EmotionModifier FailedRomance
EmotionModifier FinishedMod
EmotionModifier Fired
EmotionModifier FriendDied
EmotionModifier FunFoolingAround
EmotionModifier GoodFood
EmotionModifier HackingFail
EmotionModifier Jobless
EmotionModifier LovelyInteraction
EmotionModifier MeanConversationPartner
EmotionModifier NeedsToilet
EmotionModifier NegativeGauge
EmotionModifier NicelyDecorated
EmotionModifier NoPromotion
EmotionModifier NotEnoughCreative
EmotionModifier PassedOut
EmotionModifier PeedSelf
EmotionModifier PerfectCreation
EmotionModifier PleasantInteraction
EmotionModifier PositiveGauge
EmotionModifier Promoted
EmotionModifier ReadBook
EmotionModifier RepairFail
EmotionModifier SawSomethingPersonal
EmotionModifier SleptOutside
EmotionModifier StartedDating
IDictionary<String, EmotionModifier> Types A registry that contains all TinyLife.Emotions.EmotionModifier instances from the game and mods
EmotionModifier UglySurroundings
EmotionModifier VeryBored
EmotionModifier VeryDirty
EmotionModifier VeryHungry
EmotionModifier VeryLonely
EmotionModifier VeryTired

Static Methods

Return Name Summary
EmotionModifier Register ( EmotionModifier ) Registers the given emotion type into the TinyLife.Emotions.EmotionModifier.Types registry