Show / Hide Table of Contents

Class HumanoidCharacterProfile

Character profile. Looks immutable, but uses non-immutable semantics internally for serialization/code sanity purposes.

Inheritance
System.Object
HumanoidCharacterProfile
Implements
ICharacterProfile
Namespace: Content.Shared.Preferences
Assembly: Content.Shared.dll
Syntax
public sealed class HumanoidCharacterProfile : object, ICharacterProfile

Constructors

| Improve this Doc View Source

HumanoidCharacterProfile()

Get the default humanoid character profile, using internal constant values. Defaults to DefaultSpecies for the species.

Declaration
public HumanoidCharacterProfile()
| Improve this Doc View Source

HumanoidCharacterProfile(String, String, String, Int32, Sex, Gender, HumanoidCharacterAppearance, ClothingPreference, BackpackPreference, IReadOnlyDictionary<String, JobPriority>, PreferenceUnavailableMode, IReadOnlyList<String>, IReadOnlyList<String>)

Declaration
public HumanoidCharacterProfile(string name, string flavortext, string species, int age, Sex sex, Gender gender, HumanoidCharacterAppearance appearance, ClothingPreference clothing, BackpackPreference backpack, IReadOnlyDictionary<string, JobPriority> jobPriorities, PreferenceUnavailableMode preferenceUnavailable, IReadOnlyList<string> antagPreferences, IReadOnlyList<string> traitPreferences)
Parameters
Type Name Description
System.String name
System.String flavortext
System.String species
System.Int32 age
Sex sex
Robust.Shared.Enums.Gender gender
HumanoidCharacterAppearance appearance
ClothingPreference clothing
BackpackPreference backpack
IReadOnlyDictionary<System.String, JobPriority> jobPriorities
PreferenceUnavailableMode preferenceUnavailable
IReadOnlyList<System.String> antagPreferences
IReadOnlyList<System.String> traitPreferences

Fields

| Improve this Doc View Source

MaxDescLength

Declaration
public const int MaxDescLength = null
Field Value
Type Description
System.Int32
| Improve this Doc View Source

MaxNameLength

Declaration
public const int MaxNameLength = null
Field Value
Type Description
System.Int32

Properties

| Improve this Doc View Source

Age

Declaration
public int Age { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

AntagPreferences

Declaration
public IReadOnlyList<string> AntagPreferences { get; }
Property Value
Type Description
IReadOnlyList<System.String>
| Improve this Doc View Source

Appearance

Declaration
public HumanoidCharacterAppearance Appearance { get; }
Property Value
Type Description
HumanoidCharacterAppearance
| Improve this Doc View Source

Backpack

Declaration
public BackpackPreference Backpack { get; }
Property Value
Type Description
BackpackPreference
| Improve this Doc View Source

CharacterAppearance

Declaration
public ICharacterAppearance CharacterAppearance { get; }
Property Value
Type Description
ICharacterAppearance
| Improve this Doc View Source

Clothing

Declaration
public ClothingPreference Clothing { get; }
Property Value
Type Description
ClothingPreference
| Improve this Doc View Source

FlavorText

Declaration
public string FlavorText { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Gender

Declaration
public Gender Gender { get; }
Property Value
Type Description
Robust.Shared.Enums.Gender
| Improve this Doc View Source

JobPriorities

Declaration
public IReadOnlyDictionary<string, JobPriority> JobPriorities { get; }
Property Value
Type Description
IReadOnlyDictionary<System.String, JobPriority>
| Improve this Doc View Source

Name

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

PreferenceUnavailable

Declaration
public PreferenceUnavailableMode PreferenceUnavailable { get; }
Property Value
Type Description
PreferenceUnavailableMode
| Improve this Doc View Source

Sex

Declaration
public Sex Sex { get; }
Property Value
Type Description
Sex
| Improve this Doc View Source

Species

Declaration
public string Species { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Summary

Declaration
public string Summary { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

TraitPreferences

Declaration
public IReadOnlyList<string> TraitPreferences { get; }
Property Value
Type Description
IReadOnlyList<System.String>

Methods

| Improve this Doc View Source

DefaultWithSpecies(String)

Return a default character profile, based on species.

Declaration
public static HumanoidCharacterProfile DefaultWithSpecies(string species = null)
Parameters
Type Name Description
System.String species

The species to use in this default profile. The default species is DefaultSpecies.

Returns
Type Description
HumanoidCharacterProfile

Humanoid character profile with default settings.

| Improve this Doc View Source

EnsureValid()

Declaration
public void EnsureValid()
| Improve this Doc View Source

Equals(Nullable<Object>)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
| Improve this Doc View Source

GetName(String, Gender)

Declaration
public static string GetName(string species, Gender gender)
Parameters
Type Name Description
System.String species
Robust.Shared.Enums.Gender gender
Returns
Type Description
System.String
| Improve this Doc View Source

MemberwiseEquals(ICharacterProfile)

Declaration
public bool MemberwiseEquals(ICharacterProfile maybeOther)
Parameters
Type Name Description
ICharacterProfile maybeOther
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Random(Nullable<HashSet<String>>)

Declaration
public static HumanoidCharacterProfile Random(HashSet<string>? ignoredSpecies = null)
Parameters
Type Name Description
System.Nullable<HashSet<System.String>> ignoredSpecies
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

RandomWithSpecies(String)

Declaration
public static HumanoidCharacterProfile RandomWithSpecies(string species = null)
Parameters
Type Name Description
System.String species
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithAge(Int32)

Declaration
public HumanoidCharacterProfile WithAge(int age)
Parameters
Type Name Description
System.Int32 age
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithAntagPreference(String, Boolean)

Declaration
public HumanoidCharacterProfile WithAntagPreference(string antagId, bool pref)
Parameters
Type Name Description
System.String antagId
System.Boolean pref
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithAntagPreferences(IEnumerable<String>)

Declaration
public HumanoidCharacterProfile WithAntagPreferences(IEnumerable<string> antagPreferences)
Parameters
Type Name Description
IEnumerable<System.String> antagPreferences
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithBackpackPreference(BackpackPreference)

Declaration
public HumanoidCharacterProfile WithBackpackPreference(BackpackPreference backpack)
Parameters
Type Name Description
BackpackPreference backpack
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithCharacterAppearance(HumanoidCharacterAppearance)

Declaration
public HumanoidCharacterProfile WithCharacterAppearance(HumanoidCharacterAppearance appearance)
Parameters
Type Name Description
HumanoidCharacterAppearance appearance
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithClothingPreference(ClothingPreference)

Declaration
public HumanoidCharacterProfile WithClothingPreference(ClothingPreference clothing)
Parameters
Type Name Description
ClothingPreference clothing
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithFlavorText(String)

Declaration
public HumanoidCharacterProfile WithFlavorText(string flavorText)
Parameters
Type Name Description
System.String flavorText
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithGender(Gender)

Declaration
public HumanoidCharacterProfile WithGender(Gender gender)
Parameters
Type Name Description
Robust.Shared.Enums.Gender gender
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithJobPriorities(IEnumerable<KeyValuePair<String, JobPriority>>)

Declaration
public HumanoidCharacterProfile WithJobPriorities(IEnumerable<KeyValuePair<string, JobPriority>> jobPriorities)
Parameters
Type Name Description
IEnumerable<KeyValuePair<System.String, JobPriority>> jobPriorities
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithJobPriority(String, JobPriority)

Declaration
public HumanoidCharacterProfile WithJobPriority(string jobId, JobPriority priority)
Parameters
Type Name Description
System.String jobId
JobPriority priority
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithName(String)

Declaration
public HumanoidCharacterProfile WithName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithPreferenceUnavailable(PreferenceUnavailableMode)

Declaration
public HumanoidCharacterProfile WithPreferenceUnavailable(PreferenceUnavailableMode mode)
Parameters
Type Name Description
PreferenceUnavailableMode mode
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithSex(Sex)

Declaration
public HumanoidCharacterProfile WithSex(Sex sex)
Parameters
Type Name Description
Sex sex
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithSpecies(String)

Declaration
public HumanoidCharacterProfile WithSpecies(string species)
Parameters
Type Name Description
System.String species
Returns
Type Description
HumanoidCharacterProfile
| Improve this Doc View Source

WithTraitPreference(String, Boolean)

Declaration
public HumanoidCharacterProfile WithTraitPreference(string traitId, bool pref)
Parameters
Type Name Description
System.String traitId
System.Boolean pref
Returns
Type Description
HumanoidCharacterProfile

Implements

ICharacterProfile
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾