Search Results for

    Show / Hide Table of Contents

    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
    Implements
    IEmotionSource
    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()
    Namespace: TinyLife
    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
    Type Description
    PersonalityType

    Aromantic

    Declaration
    public static readonly PersonalityType Aromantic
    Field Value
    Type Description
    PersonalityType

    Asexual

    Declaration
    public static readonly PersonalityType Asexual
    Field Value
    Type Description
    PersonalityType

    CapableCarpenter

    Declaration
    public static readonly PersonalityType CapableCarpenter
    Field Value
    Type Description
    PersonalityType

    CityNative

    Declaration
    public static readonly PersonalityType CityNative
    Field Value
    Type Description
    PersonalityType

    ComputerAddict

    Declaration
    public static readonly PersonalityType ComputerAddict
    Field Value
    Type Description
    PersonalityType

    Creative

    Declaration
    public static readonly PersonalityType Creative
    Field Value
    Type Description
    PersonalityType

    Energetic

    Declaration
    public static readonly PersonalityType Energetic
    Field Value
    Type Description
    PersonalityType

    Extroverted

    Declaration
    public static readonly PersonalityType Extroverted
    Field Value
    Type Description
    PersonalityType

    FamilyFocused

    Declaration
    public static readonly PersonalityType FamilyFocused
    Field Value
    Type Description
    PersonalityType

    Foodie

    Declaration
    public static readonly PersonalityType Foodie
    Field Value
    Type Description
    PersonalityType

    FriendOfEveryone

    Declaration
    public static readonly PersonalityType FriendOfEveryone
    Field Value
    Type Description
    PersonalityType

    GymRat

    Declaration
    public static readonly PersonalityType GymRat
    Field Value
    Type Description
    PersonalityType

    HatesChildren

    Declaration
    public static readonly PersonalityType HatesChildren
    Field Value
    Type Description
    PersonalityType

    HouseholdHero

    Declaration
    public static readonly PersonalityType HouseholdHero
    Field Value
    Type Description
    PersonalityType

    Introverted

    Declaration
    public static readonly PersonalityType Introverted
    Field Value
    Type Description
    PersonalityType

    Lazy

    Declaration
    public static readonly PersonalityType Lazy
    Field Value
    Type Description
    PersonalityType

    Likeable

    Declaration
    public static readonly PersonalityType Likeable
    Field Value
    Type Description
    PersonalityType

    MasterChef

    Declaration
    public static readonly PersonalityType MasterChef
    Field Value
    Type Description
    PersonalityType

    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
    Type Description
    PersonalityType

    Millionaire

    Declaration
    public static readonly PersonalityType Millionaire
    Field Value
    Type Description
    PersonalityType

    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
    Type Description
    PersonalityType

    PerfectPainter

    Declaration
    public static readonly PersonalityType PerfectPainter
    Field Value
    Type Description
    PersonalityType

    Pescetarian

    Declaration
    public static readonly PersonalityType Pescetarian
    Field Value
    Type Description
    PersonalityType

    SmartKid

    Declaration
    public static readonly PersonalityType SmartKid
    Field Value
    Type Description
    PersonalityType

    Techie

    Declaration
    public static readonly PersonalityType Techie
    Field Value
    Type Description
    PersonalityType

    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
    Type Description
    PersonalityType

    Thrifty

    Declaration
    public static readonly PersonalityType Thrifty
    Field Value
    Type Description
    PersonalityType

    Types

    A registry of all of the personality types in the game. Use Register(PersonalityType) to register custom personality 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
    Type Description
    PersonalityType

    Vegetarian

    Declaration
    public static readonly PersonalityType Vegetarian
    Field Value
    Type Description
    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
    Type Description
    AgeGroup

    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
    Type Description
    System.ValueTuple<SkillCategory, System.Single>
    See Also
    BoostedSkillTypes

    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
    BoostedSkills

    Category

    This personality type's PersonalityType.TypeCategory, which defaults to Major

    Declaration
    public PersonalityType.TypeCategory Category { get; set; }
    Property Value
    Type Description
    PersonalityType.TypeCategory

    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
    Type Description
    System.Func<PersonalityType[]>

    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)

    Returns whether this personality type can be applied to the given Person. The return value is determined by the person's existing PersonalityTypes and this personality type's AllowedAges and IsCompatible(PersonalityType) value.

    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
    Type Description
    PersonalityType

    The personality type, for chaining

    Implements

    IEmotionSource

    Extension Methods

    Extensions.JsonCopy<T>(T)
    ☀
    ☾
    In This Article
    Back to top
    © 2021-2023 Ellpeck Games, Top Hat Studios – Impressum – Privacy – Status
    ☀
    ☾