Class Trait
Traits that Livings can have
Inheritance
Namespace: Mannequin.Bindings
Assembly: Collapse.dll
Syntax
public class Trait : object
Constructors
Trait(SettlerTrait)
Declaration
public Trait(SettlerTrait trait)
Parameters
Type | Name | Description |
---|---|---|
AG.GameProject.ATC.SettlerTrait | trait |
Trait(String)
Get a trait by asset name
Declaration
public Trait(string asset)
Parameters
Type | Name | Description |
---|---|---|
System.String | asset | The asset name |
Properties
CanBeAutoAssigned
Whether this trait can be automatically assigned by the procedural generation manager
Declaration
public bool CanBeAutoAssigned { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Category
The type of trait this is.
Declaration
public ETraitType Category { get; set; }
Property Value
Type | Description |
---|---|
ETraitType |
Description
Description of this trait
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Duration
Length this trait can affect a Survivor
Declaration
public int Duration { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Effect
Get or set the ETraitEffect of this trait
Declaration
public ETraitEffect Effect { get; set; }
Property Value
Type | Description |
---|---|
ETraitEffect |
ID
The ID of this Trait
Declaration
public string ID { get; }
Property Value
Type | Description |
---|---|
System.String |
IncompatibleTraits
A list of incompatible traits.
Declaration
public List<Trait> IncompatibleTraits { get; }
Property Value
Type | Description |
---|---|
List<Trait> |
Lethal
Whether this trait is lethal or not
Declaration
public bool Lethal { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Name of this trait
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Visible
Whether this trait is visible in the UI or not
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AddIncompatibleTrait(Trait)
Add an incompatible trait.
Declaration
public void AddIncompatibleTrait(Trait trait)
Parameters
Type | Name | Description |
---|---|---|
Trait | trait | The trait to add |
AddNeedMod(ELivingNeed, Int32)
Add a need mod, or how this trait affects a Living's Needs.
Declaration
public void AddNeedMod(ELivingNeed need, int change)
Parameters
Type | Name | Description |
---|---|---|
ELivingNeed | need | The need to modify |
System.Int32 | change | The change |
IsIncompatibleTrait(Trait)
Check whether a trait is marked as incompatible with this one.
Declaration
public bool IsIncompatibleTrait(Trait trait)
Parameters
Type | Name | Description |
---|---|---|
Trait | trait | The trait to check |
Returns
Type | Description |
---|---|
System.Boolean | Whether this trait is marked as incompatible |
NeedModEffects(ELivingNeed)
Get the effects this Trait has on a Need.
Declaration
public int NeedModEffects(ELivingNeed need)
Parameters
Type | Name | Description |
---|---|---|
ELivingNeed | need | The need to check |
Returns
Type | Description |
---|---|
System.Int32 | The effect this Trait has on |
RemoveIncompatibleTrait(Trait)
Remove an incompatible trait.
Declaration
public void RemoveIncompatibleTrait(Trait trait)
Parameters
Type | Name | Description |
---|---|---|
Trait | trait | The trait to remove |
RemoveNeedMod(ELivingNeed)
Remove a need mod
Declaration
public void RemoveNeedMod(ELivingNeed need)
Parameters
Type | Name | Description |
---|---|---|
ELivingNeed | need | The need that was being modified |
RemoveNeedMod(ELivingNeed, Int32)
Remove a need mod that has a certain effect
Declaration
public void RemoveNeedMod(ELivingNeed need, int change)
Parameters
Type | Name | Description |
---|---|---|
ELivingNeed | need | The need that was modified |
System.Int32 | change | The effect it had |