java.lang.Object
java.lang.Enum<Social>
mekhq.campaign.randomEvents.personalities.enums.Social
All Implemented Interfaces:
Serializable, Comparable<Social>, Constable

public enum Social extends Enum<Social>
Represents various levels and traits of social skills in a personality.

This enumeration defines a wide range of traits that can be associated with a person's personality. Traits are characterized as either "positive" or not and can optionally be "major" traits. The enumeration also handles metadata such as retrieving localized labels and descriptions.

Some traits, referred to as "Major Traits," denote stronger personality attributes and are to be handled distinctly. These traits are always listed at the end of the enumeration.

  • Enum Constant Details

    • NONE

      public static final Social NONE
    • APATHETIC

      public static final Social APATHETIC
    • AUTHENTIC

      public static final Social AUTHENTIC
    • BLUNT

      public static final Social BLUNT
    • CALLOUS

      public static final Social CALLOUS
    • CONDESCENDING

      public static final Social CONDESCENDING
    • CONSIDERATE

      public static final Social CONSIDERATE
    • DISINGENUOUS

      public static final Social DISINGENUOUS
    • DISMISSIVE

      public static final Social DISMISSIVE
    • ENCOURAGING

      public static final Social ENCOURAGING
    • ERRATIC

      public static final Social ERRATIC
    • EMPATHETIC

      public static final Social EMPATHETIC
    • FRIENDLY

      public static final Social FRIENDLY
    • INSPIRING

      public static final Social INSPIRING
    • INDIFFERENT

      public static final Social INDIFFERENT
    • INTROVERTED

      public static final Social INTROVERTED
    • IRRITABLE

      public static final Social IRRITABLE
    • NEGLECTFUL

      public static final Social NEGLECTFUL
    • PETTY

      public static final Social PETTY
    • PERSUASIVE

      public static final Social PERSUASIVE
    • RECEPTIVE

      public static final Social RECEPTIVE
    • SINCERE

      public static final Social SINCERE
    • SUPPORTIVE

      public static final Social SUPPORTIVE
    • TACTFUL

      public static final Social TACTFUL
    • UNTRUSTWORTHY

      public static final Social UNTRUSTWORTHY
    • SCHEMING

      public static final Social SCHEMING
    • ALTRUISTIC

      public static final Social ALTRUISTIC
    • COMPASSIONATE

      public static final Social COMPASSIONATE
    • GREGARIOUS

      public static final Social GREGARIOUS
    • NARCISSISTIC

      public static final Social NARCISSISTIC
    • POMPOUS

      public static final Social POMPOUS
  • Field Details

    • MAXIMUM_VARIATIONS

      public static final int MAXIMUM_VARIATIONS
      Defines the number of individual description variants available for each trait.
      See Also:
    • MAJOR_TRAITS_START_INDEX

      public static final int MAJOR_TRAITS_START_INDEX
      The index at which major traits begin within the enumeration.
      See Also:
  • Method Details

    • values

      public static Social[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Social valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getLabel

      public String getLabel()
      Retrieves the label associated with the current enumeration value.

      The label is determined based on the resource bundle for the application, utilizing the enum name combined with a specific key suffix to fetch the relevant localized string.

      Returns:
      the localized label string corresponding to the enumeration value.
    • getDescription

      public String getDescription(int socialDescriptionIndex, megamek.common.enums.Gender gender, String givenName)
      Generates a localized and personalized description for the current enumeration value.

      This method retrieves a description using the enumeration's name and a specific key suffix derived from the given ambition description index. The description is further customized using the provided gender-specific pronouns, the individual's given name, and other localized text from the resource bundle.

      Parameters:
      socialDescriptionIndex - an index representing the type/variation of the description. This value is clamped to ensure it falls within a valid range.
      gender - the Gender of the individual, used to determine appropriate pronouns for the description.
      givenName - the given name of the person. This MUST use 'person.getGivenName()' and NOT 'person.getFirstName()'
      Returns:
      a formatted description string based on the enum, the individual's gender, name, and aggression description index.
    • getRoninMessage

      public String getRoninMessage(String commanderAddress)
      Retrieves the message displayed when a Ronin warrior expresses interest in joining the campaign.

      This method formats a message using a resource key derived from the current object and includes the commander's address as part of the message formatting.

      Parameters:
      commanderAddress - the address or name of the commander to include in the message.
      Returns:
      the formatted Ronin message as a String.
    • isTraitPositive

      public boolean isTraitPositive()
      Returns:
      true if the personality trait is considered positive, false otherwise.
    • isTraitMajor

      public boolean isTraitMajor()
      Returns:
      true if the personality trait is considered a major trait, false otherwise.
    • isNone

      public boolean isNone()
    • fromString

      public static Social fromString(String text)
      Converts the given string into an instance of the Social enum. The method tries to interpret the string as both a name of an enumeration constant and as an ordinal index. If neither interpretation succeeds, it logs an error and returns NONE.
      Parameters:
      text - the string representation of the social; can be either the name of an enumeration constant or the ordinal string.
      Returns:
      the corresponding Social enum instance if the string is a valid name or ordinal; otherwise, returns NONE.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Social>