Barotrauma Server
|
Classes | |
class | LimbHealth |
Public Member Functions | |
CharacterHealth (Character character) | |
CharacterHealth (ContentXElement element, Character character, ContentXElement limbHealthElement=null) | |
IReadOnlyCollection< Affliction > | GetAllAfflictions () |
IEnumerable< Affliction > | GetAllAfflictions (Func< Affliction, bool > limbHealthFilter) |
Affliction | GetAffliction (string identifier, bool allowLimbAfflictions=true) |
Affliction | GetAffliction (Identifier identifier, bool allowLimbAfflictions=true) |
Affliction | GetAfflictionOfType (Identifier afflictionType, bool allowLimbAfflictions=true) |
T | GetAffliction< T > (Identifier identifier, bool allowLimbAfflictions=true) |
Affliction | GetAffliction (Identifier identifier, Limb limb) |
Limb | GetAfflictionLimb (Affliction affliction) |
float | GetAfflictionStrength (Identifier afflictionType, Limb limb, bool requireLimbSpecific) |
Get the total strength of the afflictions of a specific type attached to a specific limb. | |
float | GetAfflictionStrengthByType (Identifier afflictionType, bool allowLimbAfflictions=true) |
float | GetAfflictionStrengthByIdentifier (Identifier afflictionIdentifier, bool allowLimbAfflictions=true) |
float | GetAfflictionStrength (Identifier afflictionType, Identifier afflictionidentifier, bool allowLimbAfflictions=true) |
void | ApplyAffliction (Limb targetLimb, Affliction affliction, bool allowStacking=true, bool ignoreUnkillability=false) |
float | GetResistance (AfflictionPrefab afflictionPrefab) |
float | GetStatValue (StatTypes statType) |
bool | HasFlag (AbilityFlags flagType) |
void | ReduceAllAfflictionsOnAllLimbs (float amount, ActionType? treatmentAction=null) |
void | ReduceAfflictionOnAllLimbs (Identifier afflictionIdOrType, float amount, ActionType? treatmentAction=null, Character attacker=null) |
void | ReduceAllAfflictionsOnLimb (Limb targetLimb, float amount, ActionType? treatmentAction=null) |
void | ReduceAfflictionOnLimb (Limb targetLimb, Identifier afflictionIdOrType, float amount, ActionType? treatmentAction=null, Character attacker=null) |
void | ApplyDamage (Limb hitLimb, AttackResult attackResult, bool allowStacking=true) |
void | SetAllDamage (float damageAmount, float bleedingDamageAmount, float burnDamageAmount) |
float | GetLimbDamage (Limb limb, Identifier afflictionType) |
void | RemoveAllAfflictions () |
void | RemoveNegativeAfflictions () |
void | Update (float deltaTime) |
void | ForceUpdateVisuals () |
void | SetVitality (float newVitality) |
void | CalculateVitality () |
void | ApplyAfflictionStatusEffects (ActionType type) |
CauseOfDeathType Affliction affliction | GetCauseOfDeath () |
void | GetSuitableTreatments (Dictionary< Identifier, float > treatmentSuitability, Character user, Limb limb=null, bool ignoreHiddenAfflictions=false, float predictFutureDuration=0.0f) |
Get the identifiers of the items that can be used to treat the character. Takes into account all the afflictions the character has, and negative treatment suitabilities (e.g. a medicine that causes oxygen loss may not be suitable if the character is already suffocating) | |
float | GetTotalAdjustedAfflictionStrength (Affliction affliction, float otherAfflictionMultiplier=0.3f, bool includeSameAffliction=true) |
Returns the total strength of instances of the same affliction on all the characters limbs, with a smaller weight given to the other afflictions on other limbs. | |
IEnumerable< Identifier > | GetActiveAfflictionTags () |
float | GetPredictedStrength (Affliction affliction, float predictFutureDuration, Limb limb=null) |
void | ServerWrite (IWriteMessage msg) |
void | Remove () |
void | Save (XElement healthElement) |
void | Load (XElement element, Func< AfflictionPrefab, bool > afflictionPredicate=null) |
Static Public Member Functions | |
static IEnumerable< Affliction > | SortAfflictionsBySeverity (IEnumerable< Affliction > afflictions, bool excludeBuffs=true) |
Automatically filters out buffs. | |
Public Attributes | |
bool | Unkillable |
readonly Character | Character |
CauseOfDeathType | type |
Static Public Attributes | |
const float | InsufficientOxygenThreshold = 30.0f |
const float | LowOxygenThreshold = 50.0f |
static readonly Color | DefaultFaceTint = Color.TransparentBlack |
Protected Attributes | |
float | minVitality |
Properties | |
float | UnmodifiedMaxVitality [get, set] |
Maximum vitality without talent- or job-based modifiers. | |
bool | DoesBleed [get] |
bool | UseHealthWindow [get, set] |
float | CrushDepth [get] |
Affliction | BloodlossAffliction [get] |
bool | IsUnconscious [get] |
float | PressureKillDelay = 5.0f [get] |
float | Vitality [get] |
float | VitalityDisregardingDeath [get] |
How much vitality the character would have if it was alive? E.g. a character killed by disconnection or with console commands may not have any vitality-reducing afflictions despite being dead. | |
float | HealthPercentage [get] |
float | MaxVitality [get] |
float | MinVitality [get] |
Color | FaceTint [get] |
Color | BodyTint [get] |
float | OxygenAmount [get, set] |
float | BloodlossAmount [get, set] |
float | Stun [get, set] |
bool | IsParalyzed [get] |
float | StunTimer [get] |
bool | WasInFullHealth [get] |
Was the character in full health at the beginning of the frame? | |
Affliction | PressureAffliction [get] |
float | OxygenLowResistance [get] |
0-1. | |
Barotrauma.CharacterHealth.CharacterHealth | ( | Character | character | ) |
Barotrauma.CharacterHealth.CharacterHealth | ( | ContentXElement | element, |
Character | character, | ||
ContentXElement | limbHealthElement = null ) |
void Barotrauma.CharacterHealth.ApplyAffliction | ( | Limb | targetLimb, |
Affliction | affliction, | ||
bool | allowStacking = true, | ||
bool | ignoreUnkillability = false ) |
void Barotrauma.CharacterHealth.ApplyAfflictionStatusEffects | ( | ActionType | type | ) |
void Barotrauma.CharacterHealth.ApplyDamage | ( | Limb | hitLimb, |
AttackResult | attackResult, | ||
bool | allowStacking = true ) |
void Barotrauma.CharacterHealth.CalculateVitality | ( | ) |
void Barotrauma.CharacterHealth.ForceUpdateVisuals | ( | ) |
IEnumerable< Identifier > Barotrauma.CharacterHealth.GetActiveAfflictionTags | ( | ) |
Affliction Barotrauma.CharacterHealth.GetAffliction | ( | Identifier | identifier, |
bool | allowLimbAfflictions = true ) |
Affliction Barotrauma.CharacterHealth.GetAffliction | ( | Identifier | identifier, |
Limb | limb ) |
Affliction Barotrauma.CharacterHealth.GetAffliction | ( | string | identifier, |
bool | allowLimbAfflictions = true ) |
T Barotrauma.CharacterHealth.GetAffliction< T > | ( | Identifier | identifier, |
bool | allowLimbAfflictions = true ) |
T | : | Affliction |
Limb Barotrauma.CharacterHealth.GetAfflictionLimb | ( | Affliction | affliction | ) |
Affliction Barotrauma.CharacterHealth.GetAfflictionOfType | ( | Identifier | afflictionType, |
bool | allowLimbAfflictions = true ) |
float Barotrauma.CharacterHealth.GetAfflictionStrength | ( | Identifier | afflictionType, |
Identifier | afflictionidentifier, | ||
bool | allowLimbAfflictions = true ) |
float Barotrauma.CharacterHealth.GetAfflictionStrength | ( | Identifier | afflictionType, |
Limb | limb, | ||
bool | requireLimbSpecific ) |
Get the total strength of the afflictions of a specific type attached to a specific limb.
afflictionType | Type of the affliction |
limb | The limb the affliction is attached to |
requireLimbSpecific | Does the affliction have to be attached to only the specific limb. Most monsters for example don't have separate healths for different limbs, essentially meaning that every affliction is applied to every limb. |
float Barotrauma.CharacterHealth.GetAfflictionStrengthByIdentifier | ( | Identifier | afflictionIdentifier, |
bool | allowLimbAfflictions = true ) |
float Barotrauma.CharacterHealth.GetAfflictionStrengthByType | ( | Identifier | afflictionType, |
bool | allowLimbAfflictions = true ) |
IReadOnlyCollection< Affliction > Barotrauma.CharacterHealth.GetAllAfflictions | ( | ) |
IEnumerable< Affliction > Barotrauma.CharacterHealth.GetAllAfflictions | ( | Func< Affliction, bool > | limbHealthFilter | ) |
CauseOfDeathType Affliction affliction Barotrauma.CharacterHealth.GetCauseOfDeath | ( | ) |
float Barotrauma.CharacterHealth.GetLimbDamage | ( | Limb | limb, |
Identifier | afflictionType ) |
float Barotrauma.CharacterHealth.GetPredictedStrength | ( | Affliction | affliction, |
float | predictFutureDuration, | ||
Limb | limb = null ) |
float Barotrauma.CharacterHealth.GetResistance | ( | AfflictionPrefab | afflictionPrefab | ) |
float Barotrauma.CharacterHealth.GetStatValue | ( | StatTypes | statType | ) |
void Barotrauma.CharacterHealth.GetSuitableTreatments | ( | Dictionary< Identifier, float > | treatmentSuitability, |
Character | user, | ||
Limb | limb = null, | ||
bool | ignoreHiddenAfflictions = false, | ||
float | predictFutureDuration = 0::0f ) |
Get the identifiers of the items that can be used to treat the character. Takes into account all the afflictions the character has, and negative treatment suitabilities (e.g. a medicine that causes oxygen loss may not be suitable if the character is already suffocating)
treatmentSuitability | A dictionary where the key is the identifier of the item and the value the suitability |
predictFutureDuration | If above 0, the method will take into account how much currently active status effects while affect the afflictions in the next x seconds. |
float Barotrauma.CharacterHealth.GetTotalAdjustedAfflictionStrength | ( | Affliction | affliction, |
float | otherAfflictionMultiplier = 0::3f, | ||
bool | includeSameAffliction = true ) |
Returns the total strength of instances of the same affliction on all the characters limbs, with a smaller weight given to the other afflictions on other limbs.
otherAfflictionMultiplier | Multiplier on the strengths of the afflictions on other limbs. |
includeSameAffliction | Should the strength of the provided affliction be included too? |
bool Barotrauma.CharacterHealth.HasFlag | ( | AbilityFlags | flagType | ) |
void Barotrauma.CharacterHealth.Load | ( | XElement | element, |
Func< AfflictionPrefab, bool > | afflictionPredicate = null ) |
void Barotrauma.CharacterHealth.ReduceAfflictionOnAllLimbs | ( | Identifier | afflictionIdOrType, |
float | amount, | ||
ActionType? | treatmentAction = null, | ||
Character | attacker = null ) |
void Barotrauma.CharacterHealth.ReduceAfflictionOnLimb | ( | Limb | targetLimb, |
Identifier | afflictionIdOrType, | ||
float | amount, | ||
ActionType? | treatmentAction = null, | ||
Character | attacker = null ) |
void Barotrauma.CharacterHealth.ReduceAllAfflictionsOnAllLimbs | ( | float | amount, |
ActionType? | treatmentAction = null ) |
void Barotrauma.CharacterHealth.ReduceAllAfflictionsOnLimb | ( | Limb | targetLimb, |
float | amount, | ||
ActionType? | treatmentAction = null ) |
void Barotrauma.CharacterHealth.Remove | ( | ) |
void Barotrauma.CharacterHealth.RemoveAllAfflictions | ( | ) |
void Barotrauma.CharacterHealth.RemoveNegativeAfflictions | ( | ) |
void Barotrauma.CharacterHealth.Save | ( | XElement | healthElement | ) |
void Barotrauma.CharacterHealth.ServerWrite | ( | IWriteMessage | msg | ) |
void Barotrauma.CharacterHealth.SetAllDamage | ( | float | damageAmount, |
float | bleedingDamageAmount, | ||
float | burnDamageAmount ) |
void Barotrauma.CharacterHealth.SetVitality | ( | float | newVitality | ) |
|
static |
Automatically filters out buffs.
void Barotrauma.CharacterHealth.Update | ( | float | deltaTime | ) |
readonly Character Barotrauma.CharacterHealth.Character |
|
static |
|
static |
|
static |
|
protected |
CauseOfDeathType Barotrauma.CharacterHealth.type |
bool Barotrauma.CharacterHealth.Unkillable |
|
get |
|
getset |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |
|
get |
0-1.
|
get |
|
get |
|
getset |
|
get |
|
getsetprotected |
Maximum vitality without talent- or job-based modifiers.
|
getset |
|
get |
|
get |
How much vitality the character would have if it was alive? E.g. a character killed by disconnection or with console commands may not have any vitality-reducing afflictions despite being dead.
|
get |
Was the character in full health at the beginning of the frame?