Class PersonalityType
A personality type is a trait that a Person can have.
Each personality type is meant to influence the person's behavior and abilities slightly in a certain way.
Inheritance
System.Object
PersonalityType
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Tiny Life.dll
Syntax
[JsonConverter(typeof(StaticJsonConverter<PersonalityType>), new object[]{typeof(PersonalityType), "PrivateTypes"})]
public class PersonalityType : IEmotionSource
Constructors
PersonalityType(String, TextureRegion)
Creates a new personality type with the given name
Declaration
public PersonalityType(string name, TextureRegion texture)
Parameters
Type |
Name |
Description |
System.String |
name |
The name of this personality type
|
MLEM.Textures.TextureRegion |
texture |
The icon texture for this personality type
|
Fields
Ambitious
Declaration
public static readonly PersonalityType Ambitious
Field Value
Aromantic
Declaration
public static readonly PersonalityType Aromantic
Field Value
Asexual
Declaration
public static readonly PersonalityType Asexual
Field Value
ComputerAddict
Declaration
public static readonly PersonalityType ComputerAddict
Field Value
Creative
Declaration
public static readonly PersonalityType Creative
Field Value
Energetic
Declaration
public static readonly PersonalityType Energetic
Field Value
Extroverted
Declaration
public static readonly PersonalityType Extroverted
Field Value
FamilyFocused
Declaration
public static readonly PersonalityType FamilyFocused
Field Value
FriendOfEveryone
Declaration
public static readonly PersonalityType FriendOfEveryone
Field Value
GymRat
Declaration
public static readonly PersonalityType GymRat
Field Value
HatesChildren
Declaration
public static readonly PersonalityType HatesChildren
Field Value
HouseholdHero
Declaration
public static readonly PersonalityType HouseholdHero
Field Value
Introverted
Declaration
public static readonly PersonalityType Introverted
Field Value
Lazy
Declaration
public static readonly PersonalityType Lazy
Field Value
Likeable
Declaration
public static readonly PersonalityType Likeable
Field Value
MasterChef
Declaration
public static readonly PersonalityType MasterChef
Field Value
MaxMajorsPerPerson
The amount of major (non-Minor) personality types that each Person can have, based on their AgeGroup
Declaration
public static readonly Dictionary<AgeGroup, int> MaxMajorsPerPerson
Field Value
Type |
Description |
System.Collections.Generic.Dictionary<AgeGroup, System.Int32> |
|
Mean
Declaration
public static readonly PersonalityType Mean
Field Value
Millionaire
Declaration
public static readonly PersonalityType Millionaire
Field Value
Name
The name of this personality type.
As this is used for Types, this name needs to be unique across all installed mods.
Declaration
public readonly string Name
Field Value
Type |
Description |
System.String |
|
SmartKid
Declaration
public static readonly PersonalityType SmartKid
Field Value
Texture
The icon texture for this personality type
Declaration
public readonly TextureRegion Texture
Field Value
Type |
Description |
MLEM.Textures.TextureRegion |
|
Thinker
Declaration
public static readonly PersonalityType Thinker
Field Value
Types
Declaration
public static readonly IDictionary<string, PersonalityType> Types
Field Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, PersonalityType> |
|
Properties
AllowedAges
A set of age group flags that represent people of which ages can have this personality type.
This value defaults to ~0, or all ages.
Declaration
public AgeGroup AllowedAges { get; set; }
Property Value
BoostedSkills
A flag of SkillCategory values that represent the skills that are boosted by this personality type, along with the amount that they are boosted by.
If the amount is set to 0.1, for example, any skill gain will be multiplied by 1 + 0.1 (= 1.1).
The boost for a specific skill can then be retrieved using GetPersonalitySkillBoost(SkillType).
Declaration
public (SkillCategory Skill, float Amount) BoostedSkills { get; set; }
Property Value
Category
Declaration
public PersonalityType.TypeCategory Category { get; set; }
Property Value
Incompatible
A set of personality types that cannot be applied together with this one. This property is queried in IsCompatible(PersonalityType).
Defaults to null, meaning all other personality types are compatible with this one.
Declaration
public Func<PersonalityType[]> Incompatible { get; set; }
Property Value
SourceString
A (localized) string that is displayed when hovering over an EmotionModifier that has this source
Declaration
public string SourceString { get; }
Property Value
Type |
Description |
System.String |
|
Methods
IsCompatible(PersonalityType)
Declaration
public bool IsCompatible(PersonalityType other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Register(PersonalityType)
Registers this personality type to the Types registry
Declaration
public static PersonalityType Register(PersonalityType type)
Parameters
Type |
Name |
Description |
PersonalityType |
type |
The personality type to register
|
Returns
Implements
Extension Methods