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
CapableCarpenter
Declaration
public static readonly PersonalityType CapableCarpenter
Field Value
CityNative
Declaration
public static readonly PersonalityType CityNative
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
Foodie
Declaration
public static readonly PersonalityType Foodie
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 |
|
Outdoorsy
Declaration
public static readonly PersonalityType Outdoorsy
Field Value
PerfectPainter
Declaration
public static readonly PersonalityType PerfectPainter
Field Value
Pescetarian
Declaration
public static readonly PersonalityType Pescetarian
Field Value
SmartKid
Declaration
public static readonly PersonalityType SmartKid
Field Value
Techie
Declaration
public static readonly PersonalityType Techie
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
Thrifty
Declaration
public static readonly PersonalityType Thrifty
Field Value
Types
Declaration
public static readonly ReadOnlyDictionary<string, PersonalityType> Types
Field Value
Type |
Description |
System.Collections.ObjectModel.ReadOnlyDictionary<System.String, PersonalityType> |
|
Vegan
Declaration
public static readonly PersonalityType Vegan
Field Value
Vegetarian
Declaration
public static readonly PersonalityType Vegetarian
Field Value
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 set of SkillCategory values that represent the skill categories 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
See Also
BoostedSkillTypes
A set of SkillType values that represent the exact 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 (SkillType Type, float Amount)[] BoostedSkillTypes { get; set; }
Property Value
Type |
Description |
System.ValueTuple<SkillType, System.Single>[] |
|
See Also
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
CanApply(Person)
Declaration
public bool CanApply(Person person)
Parameters
Type |
Name |
Description |
Person |
person |
The person to query.
|
Returns
Type |
Description |
System.Boolean |
Whether this personality type can apply to the given Person.
|
CreateInfoGroup(Anchor, Single)
Creates a new MLEM.Ui.Elements.Group element that contains information about this PersonalityType.
Declaration
public Group CreateInfoGroup(Anchor anchor, float scale)
Parameters
Type |
Name |
Description |
MLEM.Ui.Anchor |
anchor |
The anchor to use.
|
System.Single |
scale |
The scale to render the Texture with.
|
Returns
Type |
Description |
MLEM.Ui.Elements.Group |
The created group.
|
IsCompatible(PersonalityType)
Returns whether this personality type is compatible with the other personality type, based on Incompatible.
Declaration
public bool IsCompatible(PersonalityType other)
Parameters
Type |
Name |
Description |
PersonalityType |
other |
The personality type to compare with.
|
Returns
Type |
Description |
System.Boolean |
Whether the two personalities are compatible.
|
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