Class HumanoidCharacterProfile
Character profile. Looks immutable, but uses non-immutable semantics internally for serialization/code sanity purposes.
Inheritance
System.Object
HumanoidCharacterProfile
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
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
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
|
Improve this Doc
View Source
Backpack
Declaration
public BackpackPreference Backpack { get; }
Property Value
|
Improve this Doc
View Source
CharacterAppearance
Declaration
public ICharacterAppearance CharacterAppearance { get; }
Property Value
|
Improve this Doc
View Source
Clothing
Declaration
public ClothingPreference Clothing { get; }
Property Value
|
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
|
Improve this Doc
View Source
Sex
Declaration
Property Value
|
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
|
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
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
|
Improve this Doc
View Source
RandomWithSpecies(String)
Declaration
public static HumanoidCharacterProfile RandomWithSpecies(string species = null)
Parameters
Type |
Name |
Description |
System.String |
species |
|
Returns
|
Improve this Doc
View Source
WithAge(Int32)
Declaration
public HumanoidCharacterProfile WithAge(int age)
Parameters
Type |
Name |
Description |
System.Int32 |
age |
|
Returns
|
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
|
Improve this Doc
View Source
WithAntagPreferences(IEnumerable<String>)
Declaration
public HumanoidCharacterProfile WithAntagPreferences(IEnumerable<string> antagPreferences)
Parameters
Type |
Name |
Description |
IEnumerable<System.String> |
antagPreferences |
|
Returns
|
Improve this Doc
View Source
WithBackpackPreference(BackpackPreference)
Declaration
public HumanoidCharacterProfile WithBackpackPreference(BackpackPreference backpack)
Parameters
Returns
|
Improve this Doc
View Source
WithCharacterAppearance(HumanoidCharacterAppearance)
Declaration
public HumanoidCharacterProfile WithCharacterAppearance(HumanoidCharacterAppearance appearance)
Parameters
Returns
|
Improve this Doc
View Source
WithClothingPreference(ClothingPreference)
Declaration
public HumanoidCharacterProfile WithClothingPreference(ClothingPreference clothing)
Parameters
Returns
|
Improve this Doc
View Source
WithFlavorText(String)
Declaration
public HumanoidCharacterProfile WithFlavorText(string flavorText)
Parameters
Type |
Name |
Description |
System.String |
flavorText |
|
Returns
|
Improve this Doc
View Source
WithGender(Gender)
Declaration
public HumanoidCharacterProfile WithGender(Gender gender)
Parameters
Type |
Name |
Description |
Robust.Shared.Enums.Gender |
gender |
|
Returns
|
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
|
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
|
Improve this Doc
View Source
WithName(String)
Declaration
public HumanoidCharacterProfile WithName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
|
Improve this Doc
View Source
WithPreferenceUnavailable(PreferenceUnavailableMode)
Declaration
public HumanoidCharacterProfile WithPreferenceUnavailable(PreferenceUnavailableMode mode)
Parameters
Returns
|
Improve this Doc
View Source
WithSex(Sex)
Declaration
public HumanoidCharacterProfile WithSex(Sex sex)
Parameters
Type |
Name |
Description |
Sex |
sex |
|
Returns
|
Improve this Doc
View Source
WithSpecies(String)
Declaration
public HumanoidCharacterProfile WithSpecies(string species)
Parameters
Type |
Name |
Description |
System.String |
species |
|
Returns
|
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
Implements