Barotrauma Client Doc
Barotrauma.Character Class Reference
Inheritance diagram for Barotrauma.Character:
Barotrauma.Entity Barotrauma.IDamageable Barotrauma.ISerializableEntity Barotrauma.Networking.IClientSerializable Barotrauma.Networking.IServerPositionSync Barotrauma.ISpatialEntity Barotrauma.Networking.INetSerializable Barotrauma.Networking.IServerSerializable Barotrauma.Networking.INetSerializable Barotrauma.AICharacter Barotrauma.AICharacter

Classes

struct  AddToCrewEventData
 
struct  AssignCampaignInteractionEventData
 
class  Attacker
 
struct  CharacterStatusEventData
 
struct  ControlEventData
 
struct  ExecuteAttackEventData
 
struct  InventoryStateEventData
 
class  ObjectiveEntity
 
struct  ObjectiveManagerStateEventData
 
struct  RemoveFromCrewEventData
 
struct  SetAttackTargetEventData
 
struct  TreatmentEventData
 
struct  UpdateExperienceEventData
 
struct  UpdatePermanentStatsEventData
 
struct  UpdateSkillsEventData
 
struct  UpdateTalentsEventData
 

Public Types

enum class  EventType {
  InventoryState = 0 , Control = 1 , Status = 2 , Treatment = 3 ,
  SetAttackTarget = 4 , ExecuteAttack = 5 , AssignCampaignInteraction = 6 , ObjectiveManagerState = 7 ,
  TeamChange = 8 , AddToCrew = 9 , UpdateExperience = 10 , UpdateTalents = 11 ,
  UpdateSkills = 12 , UpdateMoney = 13 , UpdatePermanentStats = 14 , RemoveFromCrew = 15 ,
  MinValue = 0 , MaxValue = 15
}
 

Public Member Functions

void SetOriginalTeam (CharacterTeamType newTeam)
 
bool HasTeamChange (string identifier)
 
bool TryAddNewTeamChange (string identifier, ActiveTeamChange newTeamChange)
 
bool TryRemoveTeamChange (string identifier)
 
void UpdateTeam ()
 
void ReleaseSecondaryItem ()
 
bool IsAnySelectedItem (Item item)
 Is the item either the primary or the secondary selected item? More...
 
bool HasSelectedAnotherSecondaryItem (Item item)
 
delegate void OnDeathHandler (Character character, CauseOfDeath causeOfDeath)
 
delegate void OnAttackedHandler (Character attacker, AttackResult attackResult)
 
void ReloadHead (int? headId=null, int hairIndex=-1, int beardIndex=-1, int moustacheIndex=-1, int faceAttachmentIndex=-1)
 
void LoadHeadAttachments ()
 
bool IsKeyHit (InputType inputType)
 
bool IsKeyDown (InputType inputType)
 
void SetInput (InputType inputType, bool hit, bool held)
 
void ClearInput (InputType inputType)
 
void ClearInputs ()
 
override string ToString ()
 
void GiveJobItems (WayPoint spawnPoint=null)
 
void GiveIdCardTags (WayPoint spawnPoint, bool createNetworkEvent=false)
 
float GetSkillLevel (string skillIdentifier)
 
float GetSkillLevel (Identifier skillIdentifier)
 
Vector2 GetTargetMovement ()
 
Vector2 ApplyMovementLimits (Vector2 targetMovement, float currentSpeed)
 
void StackSpeedMultiplier (float val)
 
void ResetSpeedMultiplier ()
 
void StackHealthMultiplier (float val)
 
float GetTemporarySpeedReduction ()
 Speed reduction from the current limb specific damage. Min 0, max 1. More...
 
float GetRightHandPenalty ()
 
float GetLeftHandPenalty ()
 
float GetLegPenalty (float startSum=0)
 
float ApplyTemporarySpeedLimits (float speed)
 
void Control (float deltaTime, Camera cam)
 
void SetAttackTarget (Limb attackLimb, IDamageable damageTarget, Vector2 attackPos)
 
bool CanSeeTarget (ISpatialEntity target, ISpatialEntity seeingEntity=null, bool seeThroughWindows=false, bool checkFacing=false)
 
bool IsFacing (Vector2 targetWorldPos)
 A simple check if the character Dir is towards the target or not. Uses the world coordinates. More...
 
bool HasItem (Item item, bool requireEquipped=false, InvSlotType? slotType=null)
 
bool HasEquippedItem (Item item, InvSlotType? slotType=null, Func< InvSlotType, bool > predicate=null)
 
bool HasEquippedItem (Identifier tagOrIdentifier, bool allowBroken=true, InvSlotType? slotType=null)
 
Item GetEquippedItem (Identifier? tagOrIdentifier=null, InvSlotType? slotType=null)
 
bool CanAccessInventory (Inventory inventory)
 
bool FindItem (ref int itemIndex, out Item targetItem, IEnumerable< Identifier > identifiers=null, bool ignoreBroken=true, IEnumerable< Item > ignoredItems=null, IEnumerable< Identifier > ignoredContainerIdentifiers=null, Func< Item, bool > customPredicate=null, Func< Item, float > customPriorityFunction=null, float maxItemDistance=10000, ISpatialEntity positionalReference=null)
 Finds the closest item seeking by identifiers or tags from the world. Ignores items that are outside or in another team's submarine or in a submarine that is not connected to this submarine. Also ignores non-interactable items and items that are taken by someone else. The method is run in steps for performance reasons. So you'll have to provide the reference to the itemIndex. Returns false while running and true when done. More...
 
bool IsItemTakenBySomeoneElse (Item item)
 
bool CanInteractWith (Character c, float maxDist=200.0f, bool checkVisibility=true, bool skipDistanceCheck=false)
 
bool CanInteractWith (Item item, bool checkLinked=true)
 
bool CanInteractWith (Item item, out float distanceToItem, bool checkLinked)
 
void SetCustomInteract (Action< Character, Character > onCustomInteract, LocalizedString hudText)
 Set an action that's invoked when another character interacts with this one. More...
 
void SelectCharacter (Character character)
 
void DeselectCharacter ()
 
void DoInteractionUpdate (float deltaTime, Vector2 mouseSimPos)
 
virtual void Update (float deltaTime, Camera cam)
 
void AddAttacker (Character character, float damage)
 
void ForgiveAttacker (Character character)
 
float GetDamageDoneByAttacker (Character otherCharacter)
 
float GetDistanceToClosestLimb (Vector2 simPos)
 
void DespawnNow (bool createNetworkEvents=true)
 
bool CanHearCharacter (Character speaker)
 
void SetOrder (Order order, bool isNewOrder, bool speak=true, bool force=false)
 
Parameters
forceForce an order to be set for the character, bypassing hearing checks
More...
 
Order GetCurrentOrderWithTopPriority ()
 
Order GetCurrentOrder (Order order)
 
void DisableLine (Identifier identifier)
 
void DisableLine (string identifier)
 
void Speak (string message, ChatMessageType? messageType=null, float delay=0.0f, Identifier identifier=default, float minDurationBetweenSimilar=0.0f)
 
void ShowSpeechBubble (float duration, Color color)
 
void SetAllDamage (float damageAmount, float bleedingDamageAmount, float burnDamageAmount)
 
AttackResult AddDamage (Character attacker, Vector2 worldPosition, Attack attack, Vector2 impulseDirection, float deltaTime, bool playSound=true)
 
AttackResult ApplyAttack (Character attacker, Vector2 worldPosition, Attack attack, float deltaTime, Vector2 impulseDirection, bool playSound=false, Limb targetLimb=null, float penetration=0f)
 Apply the specified attack to this character. If the targetLimb is not specified, the limb closest to worldPosition will receive the damage. More...
 
void TrySeverLimbJoints (Limb targetLimb, float severLimbsProbability, float damage, bool allowBeheading, bool ignoreSeveranceProbabilityModifier=false, Character attacker=null)
 
AttackResult AddDamage (Vector2 worldPosition, IEnumerable< Affliction > afflictions, float stun, bool playSound, Vector2? attackImpulse=null, Character attacker=null, float damageMultiplier=1f)
 
AttackResult AddDamage (Vector2 worldPosition, IEnumerable< Affliction > afflictions, float stun, bool playSound, Vector2 attackImpulse, out Limb hitLimb, Character attacker=null, float damageMultiplier=1)
 
void RecordKill (Character target)
 
AttackResult DamageLimb (Vector2 worldPosition, Limb hitLimb, IEnumerable< Affliction > afflictions, float stun, bool playSound, Vector2 attackImpulse, Character attacker=null, float damageMultiplier=1, bool allowStacking=true, float penetration=0f, bool shouldImplode=false)
 
void TryAdjustAttackerSkill (Character attacker, AttackResult attackResult)
 
void TryAdjustHealerSkill (Character healer, float healthChange=0, Affliction affliction=null)
 
void SetStun (float newStun, bool allowStunDecrease=false, bool isNetworkMessage=false)
 
void ApplyStatusEffects (ActionType actionType, float deltaTime)
 
void BreakJoints ()
 
void Kill (CauseOfDeathType causeOfDeath, Affliction causeOfDeathAffliction, bool isNetworkMessage=false, bool log=true)
 
void Revive (bool removeAfflictions=true, bool createNetworkEvent=false)
 
override void Remove ()
 
void TeleportTo (Vector2 worldPos)
 
void SaveInventory ()
 Calls SaveInventory(Barotrauma.Inventory, XElement) using 'Inventory' and 'Info.InventoryData' More...
 
void SpawnInventoryItems (Inventory inventory, ContentXElement itemData)
 
IEnumerable< AttackContextGetAttackContexts ()
 
List< HullGetVisibleHulls ()
 Returns hulls that are visible to the character, including the current hull. Note that this is not an accurate visibility check, it only checks for open gaps between the adjacent and linked hulls. Can be heavy if used every frame. More...
 
Vector2 GetRelativeSimPosition (ISpatialEntity target, Vector2? worldPos=null)
 
bool HasJob (string identifier)
 
bool HasJob (Identifier identifier)
 
void LoadTalents ()
 
bool GiveTalent (Identifier talentIdentifier, bool addingFirstTime=true)
 
bool GiveTalent (UInt32 talentIdentifier, bool addingFirstTime=true)
 
bool GiveTalent (TalentPrefab talentPrefab, bool addingFirstTime=true)
 
bool HasTalent (Identifier identifier)
 
bool HasUnlockedAllTalents ()
 
bool HasTalents ()
 
void CheckTalents (AbilityEffectType abilityEffectType, AbilityObject abilityObject)
 
void CheckTalents (AbilityEffectType abilityEffectType)
 
bool IsInSameRoomAs (Character character)
 Check if the character is in the same room Room and hull differ in that a room can consist of multiple linked hulls More...
 
bool HasRecipeForItem (Identifier recipeIdentifier)
 
bool HasStoreAccessForItem (ItemPrefab prefab)
 
void GiveMoney (int amount)
 Shows visual notification of money gained by the specific player. Useful for mid-mission monetary gains. More...
 
void SetMoney (int amount)
 
float GetStatValue (StatTypes statType, bool includeSaved=true)
 
void OnWearablesChanged ()
 
void ChangeStat (StatTypes statType, float value)
 
void AddAbilityFlag (AbilityFlags abilityFlag)
 
void RemoveAbilityFlag (AbilityFlags abilityFlag)
 
bool HasAbilityFlag (AbilityFlags abilityFlag)
 
float GetAbilityResistance (AfflictionPrefab affliction)
 
void ChangeAbilityResistance (TalentResistanceIdentifier identifier, float value)
 
void RemoveAbilityResistance (TalentResistanceIdentifier identifier)
 
bool IsFriendly (Character other)
 
bool IsOnFriendlyTeam (Character other)
 
bool IsOnFriendlyTeam (CharacterTeamType otherTeam)
 
bool IsSameSpeciesOrGroup (Character other)
 
void StopClimbing ()
 
void ResetNetState ()
 
void ControlLocalPlayer (float deltaTime, Camera cam, bool moveCam=true)
 Control the Character according to player input More...
 
void UpdateLocalCursor (Camera cam)
 
void EmulateInput (InputType input)
 
Item FindItemAtPosition (Vector2 simPosition, float aimAssistModifier=0.0f, Item[] ignoredItems=null)
 Finds the front (lowest depth) interactable item at a position. "Interactable" in this case means that the character can "reach" the item. More...
 
bool ShouldLockHud ()
 
virtual void AddToGUIUpdateList ()
 
void DoVisibilityCheck (Camera cam)
 
void Draw (SpriteBatch spriteBatch, Camera cam)
 
void DrawHUD (SpriteBatch spriteBatch, Camera cam, bool drawHealth=true)
 
void DrawGUIMessages (SpriteBatch spriteBatch, Camera cam)
 
virtual void DrawFront (SpriteBatch spriteBatch, Camera cam)
 
Color GetNameColor ()
 
void AddMessage (string rawText, Color color, bool playSound, Identifier identifier=default, int? value=null, float lifetime=3.0f)
 
HUDProgressBar UpdateHUDProgressBar (object linkedObject, Vector2 worldPosition, float progress, Color emptyColor, Color fullColor, string textTag="")
 Creates a progress bar that's "linked" to the specified object (or updates an existing one if there's one already linked to the object) The progress bar will automatically fade out after 1 sec if the method hasn't been called during that time More...
 
void PlaySound (CharacterSound.SoundType soundType, float soundIntervalFactor=1.0f, float maxInterval=0)
 
void AddActiveObjectiveEntity (Entity entity, Sprite sprite, Color? color=null)
 
void RemoveActiveObjectiveEntity (Entity entity)
 
CharacterSound GetSound (Func< CharacterSound, bool > predicate=null, bool random=false)
 Note that when a predicate is provided, the random option uses Linq.Where() extension method, which creates a new collection. More...
 
void ClientWriteInput (in SegmentTableWriter< ClientNetSegment > segmentTableWriter, IWriteMessage msg)
 
virtual void ClientEventWrite (IWriteMessage msg, NetEntityEvent.IData extraData=null)
 
void ClientReadPosition (IReadMessage msg, float sendingTime)
 
virtual void ClientEventRead (IReadMessage msg, float sendingTime)
 
- Public Member Functions inherited from Barotrauma.Entity
 Entity (Submarine submarine, ushort id)
 
void FreeID ()
 Removes the entity from the entity dictionary and frees up the ID it was using. More...
 

Static Public Member Functions

static Character Create (CharacterInfo characterInfo, Vector2 position, string seed, ushort id=Entity.NullEntityID, bool isRemotePlayer=false, bool hasAi=true, RagdollParams ragdoll=null, bool spawnInitialItems=true)
 Create a new character More...
 
static Character Create (string speciesName, Vector2 position, string seed, CharacterInfo characterInfo=null, ushort id=Entity.NullEntityID, bool isRemotePlayer=false, bool hasAi=true, bool createNetworkEvent=true, RagdollParams ragdoll=null, bool throwErrorIfNotFound=true, bool spawnInitialItems=true)
 Create a new character More...
 
static Character Create (Identifier speciesName, Vector2 position, string seed, CharacterInfo characterInfo=null, ushort id=Entity.NullEntityID, bool isRemotePlayer=false, bool hasAi=true, bool createNetworkEvent=true, RagdollParams ragdoll=null, bool throwErrorIfNotFound=true, bool spawnInitialItems=true)
 
static Character Create (CharacterPrefab prefab, Vector2 position, string seed, CharacterInfo characterInfo=null, ushort id=Entity.NullEntityID, bool isRemotePlayer=false, bool hasAi=true, bool createNetworkEvent=true, RagdollParams ragdoll=null, bool spawnInitialItems=true)
 
static bool IsTargetVisible (ISpatialEntity target, ISpatialEntity seeingEntity, bool seeThroughWindows=false, bool checkFacing=false)
 
static void UpdateAnimAll (float deltaTime)
 
static void UpdateAll (float deltaTime, Camera cam)
 
static void RemoveByPrefab (CharacterPrefab prefab)
 
static void SaveInventory (Inventory inventory, XElement parentElement)
 
static IEnumerable< CharacterGetFriendlyCrew (Character character)
 
static bool IsFriendly (Character me, Character other)
 
static bool IsOnFriendlyTeam (CharacterTeamType myTeam, CharacterTeamType otherTeam)
 
static bool IsOnFriendlyTeam (Character me, Character other)
 
static bool IsSameSpeciesOrGroup (Character me, Character other)
 
static void AddAllToGUIUpdateList ()
 
static Character ReadSpawnData (IReadMessage inc)
 
- Static Public Member Functions inherited from Barotrauma.Entity
static IReadOnlyCollection< EntityGetEntities ()
 
static int FindFreeIdBlock (int minBlockSize)
 Finds a contiguous block of free IDs of at least the given size More...
 
static Entity FindEntityByID (ushort ID)
 Find an entity based on the ID More...
 
static void RemoveAll ()
 
static void DumpIds (int count, string filename)
 

Public Attributes

Hull PreviousHull = null
 
Hull CurrentHull = null
 
readonly Dictionary< Identifier, SerializablePropertyProperties
 
readonly HashSet< LatchOntoAILatchers = new HashSet<LatchOntoAI>()
 
readonly HashSet< ProjectileAttachedProjectiles = new HashSet<Projectile>()
 
CombatAction CombatAction
 
readonly AnimController AnimController
 
readonly string Seed
 
Entity LastDamageSource
 
AttackResult LastDamage
 
readonly CharacterPrefab Prefab
 
readonly CharacterParams Params
 
LocalizedString TraitorCurrentObjective = ""
 
ConversationAction ActiveConversation
 
bool RequireConsciousnessForCustomInteract = true
 
float KnockbackCooldownTimer
 
bool IsRagdolled
 
bool IsForceRagdolled
 
bool dontFollowCursor
 
bool DisableHealthWindow
 
bool GodMode = false
 Godmoded characters cannot receive any afflictions whatsoever More...
 
CampaignMode.InteractionType CampaignInteractionType
 
Identifier MerchantIdentifier
 
HashSet< IdentifierMarkedAsLooted = new()
 
OnDeathHandler OnDeath
 
OnAttackedHandler OnAttacked
 
UInt16 LastNetworkUpdateID = 0
 
UInt16 LastProcessedID
 ID of the last inputs the server has processed More...
 
float healthUpdateTimer
 
bool isSynced = false
 
bool ExternalHighlight
 
- Public Attributes inherited from Barotrauma.Entity
readonly ushort ID
 Unique, but non-persistent identifier. Stays the same if the entities are created in the exactly same order, but doesn't persist e.g. between the rounds. More...
 
readonly string CreationStackTrace
 
readonly UInt64 CreationIndex
 

Static Public Attributes

static readonly List< CharacterCharacterList = new List<Character>()
 
static int CharacterUpdateInterval = 1
 
const float MaxHighlightDistance = 150.0f
 
const float MaxDragDistance = 200.0f
 
const float KnockbackCooldown = 5.0f
 
static bool DisableControls
 
static bool DebugDrawInteract
 
- Static Public Attributes inherited from Barotrauma.Entity
const ushort NullEntityID = 0
 
const ushort EntitySpawnerID = ushort.MaxValue
 
const ushort RespawnManagerID = ushort.MaxValue - 1
 
const ushort DummyID = ushort.MaxValue - 2
 
const ushort ReservedIDStart = ushort.MaxValue - 3
 
const ushort MaxEntityCount = ushort.MaxValue - 4
 
static EntitySpawner Spawner
 

Protected Member Functions

 Character (CharacterPrefab prefab, Vector2 position, string seed, CharacterInfo characterInfo=null, ushort id=Entity.NullEntityID, bool isRemotePlayer=false, RagdollParams ragdollParams=null, bool spawnInitialItems=true)
 
float GetDistanceToClosestPlayer ()
 How far the character is from the closest human player (including spectators) More...
 
float GetDistanceSqrToClosestPlayer ()
 How far the character is from the closest human player (including spectators) More...
 
- Protected Member Functions inherited from Barotrauma.Entity
virtual ushort DetermineID (ushort id, Submarine submarine)
 

Protected Attributes

Key[] keys
 
readonly Dictionary< string, ActiveTeamChangeactiveTeamChanges = new Dictionary<string, ActiveTeamChange>()
 
ActiveTeamChange currentTeamChange
 
float oxygenAvailable
 
Item focusedItem
 
float soundTimer
 
float hudInfoTimer = 1.0f
 
bool hudInfoVisible = false
 
float lastRecvPositionUpdateTime
 
- Protected Attributes inherited from Barotrauma.Entity
AITarget aiTarget
 

Properties

bool Enabled [get, set]
 
bool DisabledByEvent [get, set]
 MonsterEvents disable monsters (which includes removing them from the character list, so they essentially "don't exist") until they're ready to spawn More...
 
bool IsRemotelyControlled [get]
 Is the character controlled remotely (either by another player, or a server-side AIController) More...
 
bool IsRemotePlayer [get, set]
 Is the character controlled by another human player (should always be false in single player) More...
 
bool IsLocalPlayer [get]
 
bool IsPlayer [get]
 
bool IsCommanding [get]
 Is the character player or does it have an active ship command manager (an AI controlled sub)? Bots in the player team are not treated as commanders. More...
 
bool IsBot [get]
 
bool IsEscorted [get, set]
 
Identifier JobIdentifier [get]
 
bool DoesBleed [get, set]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 
Key[] Keys [get]
 
HumanPrefab HumanPrefab [get, set]
 
Identifier????? Faction [get, set]
 
CharacterTeamType TeamID [get, set]
 
CharacterTeamType?? OriginalTeamID [get]
 
Wallet Wallet [get, set]
 
bool IsOnPlayerTeam [get]
 
bool IsOriginallyOnPlayerTeam [get]
 
bool IsFriendlyNPCTurnedHostile [get]
 
bool IsInstigator [get]
 
IEnumerable< AttackerLastAttackers [get]
 
Character LastAttacker [get]
 
Character LastOrderedCharacter [get]
 
Character SecondLastOrderedCharacter [get]
 
Dictionary< ItemPrefab, double > ItemSelectedDurations [get]
 
float InvisibleTimer [get, set]
 
Identifier SpeciesName [get]
 
Identifier Group [get]
 
bool IsHumanoid [get]
 
bool IsMachine [get]
 
bool IsHusk [get]
 
bool IsDisguisedAsHusk [get]
 
bool IsHuskInfected [get]
 
bool IsMale [get]
 
bool IsFemale [get]
 
string BloodDecalName [get]
 
bool CanSpeak [get, set]
 
bool NeedsAir [get, set]
 
bool NeedsWater [get, set]
 
bool NeedsOxygen [get]
 
float Noise [get, set]
 
float Visibility [get, set]
 
bool IsTraitor [get, set]
 
bool IsHuman [get]
 
List< OrderCurrentOrders [get]
 
bool IsDismissed [get]
 
Entity ViewTarget [get, set]
 
Vector2 AimRefPosition [get]
 
CharacterInfo Info [get, set]
 
Identifier VariantOf [get]
 
string? Name [get]
 
string? DisplayName [get]
 
string?? LogName [get]
 
bool? HideFace [get, set]
 
string ConfigPath [get]
 
float Mass [get]
 
CharacterInventory Inventory [get]
 
bool DisableInteract [get, set]
 Prevents the character from interacting with items or characters More...
 
bool DisableFocusingOnEntities [get, set]
 Prevents the character from highlighting items or characters with the cursor, meaning it can't interact with anything but the things it has currently selected/equipped More...
 
LocalizedString CustomInteractHUDText [get]
 
bool AllowCustomInteract [get]
 
bool? LockHands [get, set]
 
bool AllowInput [get]
 
bool CanMove [get]
 
bool CanInteract [get]
 
bool CanEat [get]
 
Vector2 CursorPosition [get, set]
 
Vector2 SmoothedCursorPosition [get]
 
Vector2? CursorWorldPosition [get]
 
Character FocusedCharacter [get, set]
 
Character SelectedCharacter [get, set]
 
Character SelectedBy [get, set]
 
IEnumerable< Item >?? HeldItems [get]
 Items the character has in their hand slots. Doesn't return nulls and only returns items held in both hands once. More...
 
float LowPassMultiplier [get, set]
 
bool? ObstructVision [get, set]
 
float PressureProtection [get, set]
 
bool InPressure [get]
 Can be used by status effects to check whether the characters is in a high-pressure environment More...
 
AnimController.Animation??? Anim [get]
 Can be used by status effects More...
 
bool IsIncapacitated [get]
 
bool IsUnconscious [get]
 
bool IsArrested [get]
 
bool IsPet [get]
 
float Oxygen [get, set]
 
float OxygenAvailable [get, set]
 
float??? HullOxygenPercentage [get]
 
bool UseHullOxygen = true [get, set]
 
float? Stun [get, set]
 
CharacterHealth CharacterHealth [get]
 
float Vitality [get]
 
float Health [get]
 
float HealthPercentage [get]
 
float MaxVitality [get]
 
float MaxHealth [get]
 
bool WasFullHealth [get]
 Was the character in full health at the beginning of the frame? More...
 
AIState AIState [get]
 
bool IsLatched [get]
 
float EmpVulnerability [get]
 
float PoisonVulnerability [get]
 
bool IsFlipped [get]
 
float Bloodloss [get, set]
 
float Bleeding [get]
 
float SpeechImpediment [get, set]
 
float PressureTimer [get]
 
float DisableImpactDamageTimer [get, set]
 
bool IgnoreMeleeWeapons [get, set]
 
float???? CurrentSpeed [get]
 Current speed of the character's collider. Can be used by status effects to check if the character is moving. More...
 
Item????????? SelectedItem [get, set]
 The primary selected item. It can be any device that character interacts with. This excludes items like ladders and chairs which are assigned to SelectedSecondaryItem. More...
 
Item SelectedSecondaryItem [get, set]
 The secondary selected item. It's an item other than a device (see SelectedItem), e.g. a ladder or a chair. More...
 
bool HasSelectedAnyItem [get]
 Has the characters selected a primary or a secondary item? More...
 
Item FocusedItem [get, set]
 
Item PickingItem [get, set]
 
virtual AIController AIController [get]
 
bool IsDead [get, set]
 
bool EnableDespawn = true [get, set]
 
CauseOfDeath CauseOfDeath [get]
 
bool CanBeSelected [get]
 
bool CanBeDragged [get, set]
 
bool CanInventoryBeAccessed [get, set]
 
bool CanAim [get]
 
bool InWater [get]
 
bool IsLowInOxygen [get]
 
bool Unkillable [get, set]
 
bool UseHealthWindow [get, set]
 Is the health interface available on this character? Can be used by status effects More...
 
override Vector2? SimPosition [get]
 
override Vector2 Position [get]
 
override Vector2 DrawPosition [get]
 
bool IsInFriendlySub [get]
 
bool IsInPlayerSub [get]
 
float AITurretPriority [get]
 
Vector2? OverrideMovement [get, set]
 
bool ForceRun [get, set]
 
bool IsClimbing [get]
 
bool CanRun [get]
 
float SpeedMultiplier = 1 [get]
 Can be used to modify the character's speed via StatusEffects More...
 
float PropulsionSpeedMultiplier [get, set]
 Can be used to modify the speed at which Propulsion ItemComponents move the character via StatusEffects (e.g. heavy suit can slow down underwater scooters) More...
 
float HealthMultiplier = 1 [get]
 Can be used to modify the character's health via StatusEffects More...
 
float HumanPrefabHealthMultiplier = 1 [get]
 Health multiplier of the human prefab this character is an instance of (if any) More...
 
bool IsKnockedDown [get]
 Is the character knocked down regardless whether the technical state is dead, unconcious, paralyzed, or stunned. With stunning, the parameter uses an one second delay before the character is treated as knocked down. The purpose of this is to ignore minor stunning. If you don't want to to ignore any stun, use the Stun property. More...
 
bool IsCaptain [get]
 
bool IsEngineer [get]
 
bool IsMechanic [get]
 
bool IsMedic [get]
 
bool IsSecurity [get]
 
bool IsAssistant [get]
 
bool IsWatchman [get]
 
bool IsVip [get]
 
bool IsPrisoner [get]
 
bool IsKiller [get]
 
Color? UniqueNameColor = null [get, set]
 
bool IsProtectedFromPressure [get]
 Is the character currently protected from the pressure by immunity/ability or a status effect (e.g. from a diving suit). More...
 
bool IsImmuneToPressure [get]
 
IReadOnlyCollection< CharacterTalentCharacterTalents [get]
 
float? HealthUpdateInterval [get, set]
 
List< CharacterStateInfoMemState [get]
 
List< CharacterStateInfoMemLocalState [get]
 
bool IsVisible = true [get]
 Is the character currently visible on the camera. Refresh the value by calling DoVisibilityCheck. More...
 
static CharacterControlled [get, set]
 
Dictionary< object, HUDProgressBarHUDProgressBars [get]
 
float BlurStrength [get, set]
 
float DistortStrength [get, set]
 
float RadialDistortStrength [get, set]
 
float ChromaticAberrationStrength [get, set]
 
Color GrainColor [get, set]
 
float GrainStrength [get, set]
 
float???????? CollapseEffectStrength [get, set]
 Can be used by status effects More...
 
float????? CameraShake [get, set]
 Can be used to set camera shake from status effects More...
 
IEnumerable< ParticleEmitterBloodEmitters [get]
 
IEnumerable< ParticleEmitterDamageEmitters [get]
 
IEnumerable< ParticleEmitterGibEmitters [get]
 
static bool IsMouseOnUI [get]
 
IEnumerable< ObjectiveEntityActiveObjectiveEntities [get]
 
- Properties inherited from Barotrauma.Entity
static int EntityCount [get]
 
bool Removed [get]
 
bool IdFreed [get]
 
virtual Vector2 SimPosition [get]
 
virtual Vector2 Position [get]
 
virtual Vector2 WorldPosition [get]
 
virtual Vector2 DrawPosition [get]
 
Submarine Submarine [get, set]
 
AITarget AiTarget [get]
 
bool InDetectable [get, set]
 
double SpawnTime [get]
 
string ErrorLine [get]
 
- Properties inherited from Barotrauma.ISpatialEntity
Vector2 Position [get]
 
Vector2 WorldPosition [get]
 
Vector2 SimPosition [get]
 
Submarine Submarine [get]
 
- Properties inherited from Barotrauma.IDamageable
Vector2 SimPosition [get]
 
Vector2 WorldPosition [get]
 
float Health [get]
 
- Properties inherited from Barotrauma.ISerializableEntity
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 

Detailed Description

Member Enumeration Documentation

◆ EventType

Enumerator
InventoryState 
Control 
Status 
Treatment 
SetAttackTarget 
ExecuteAttack 
AssignCampaignInteraction 
ObjectiveManagerState 
TeamChange 
AddToCrew 
UpdateExperience 
UpdateTalents 
UpdateSkills 
UpdateMoney 
UpdatePermanentStats 
RemoveFromCrew 
MinValue 
MaxValue 

Definition at line 12 of file CharacterEventData.cs.

Constructor & Destructor Documentation

◆ Character()

Barotrauma.Character.Character ( CharacterPrefab  prefab,
Vector2  position,
string  seed,
CharacterInfo  characterInfo = null,
ushort  id = Entity.NullEntityID,
bool  isRemotePlayer = false,
RagdollParams  ragdollParams = null,
bool  spawnInitialItems = true 
)
protected

Member Function Documentation

◆ AddAbilityFlag()

void Barotrauma.Character.AddAbilityFlag ( AbilityFlags  abilityFlag)

◆ AddActiveObjectiveEntity()

void Barotrauma.Character.AddActiveObjectiveEntity ( Entity  entity,
Sprite  sprite,
Color?  color = null 
)

◆ AddAllToGUIUpdateList()

static void Barotrauma.Character.AddAllToGUIUpdateList ( )
static

◆ AddAttacker()

void Barotrauma.Character.AddAttacker ( Character  character,
float  damage 
)

◆ AddDamage() [1/3]

AttackResult Barotrauma.Character.AddDamage ( Character  attacker,
Vector2  worldPosition,
Attack  attack,
Vector2  impulseDirection,
float  deltaTime,
bool  playSound = true 
)

◆ AddDamage() [2/3]

AttackResult Barotrauma.Character.AddDamage ( Vector2  worldPosition,
IEnumerable< Affliction afflictions,
float  stun,
bool  playSound,
Vector2  attackImpulse,
out Limb  hitLimb,
Character  attacker = null,
float  damageMultiplier = 1 
)

◆ AddDamage() [3/3]

AttackResult Barotrauma.Character.AddDamage ( Vector2  worldPosition,
IEnumerable< Affliction afflictions,
float  stun,
bool  playSound,
Vector2?  attackImpulse = null,
Character  attacker = null,
float  damageMultiplier = 1f 
)

◆ AddMessage()

void Barotrauma.Character.AddMessage ( string  rawText,
Color  color,
bool  playSound,
Identifier  identifier = default,
int?  value = null,
float  lifetime = 3.0f 
)

◆ AddToGUIUpdateList()

virtual void Barotrauma.Character.AddToGUIUpdateList ( )
virtual

◆ ApplyAttack()

AttackResult Barotrauma.Character.ApplyAttack ( Character  attacker,
Vector2  worldPosition,
Attack  attack,
float  deltaTime,
Vector2  impulseDirection,
bool  playSound = false,
Limb  targetLimb = null,
float  penetration = 0f 
)

Apply the specified attack to this character. If the targetLimb is not specified, the limb closest to worldPosition will receive the damage.

Definition at line 4051 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ ApplyMovementLimits()

Vector2 Barotrauma.Character.ApplyMovementLimits ( Vector2  targetMovement,
float  currentSpeed 
)

◆ ApplyStatusEffects()

void Barotrauma.Character.ApplyStatusEffects ( ActionType  actionType,
float  deltaTime 
)

◆ ApplyTemporarySpeedLimits()

float Barotrauma.Character.ApplyTemporarySpeedLimits ( float  speed)

◆ BreakJoints()

void Barotrauma.Character.BreakJoints ( )

◆ CanAccessInventory()

bool Barotrauma.Character.CanAccessInventory ( Inventory  inventory)

◆ CanHearCharacter()

bool Barotrauma.Character.CanHearCharacter ( Character  speaker)

◆ CanInteractWith() [1/3]

bool Barotrauma.Character.CanInteractWith ( Character  c,
float  maxDist = 200.0f,
bool  checkVisibility = true,
bool  skipDistanceCheck = false 
)

◆ CanInteractWith() [2/3]

bool Barotrauma.Character.CanInteractWith ( Item  item,
bool  checkLinked = true 
)

◆ CanInteractWith() [3/3]

bool Barotrauma.Character.CanInteractWith ( Item  item,
out float  distanceToItem,
bool  checkLinked 
)

◆ CanSeeTarget()

bool Barotrauma.Character.CanSeeTarget ( ISpatialEntity  target,
ISpatialEntity  seeingEntity = null,
bool  seeThroughWindows = false,
bool  checkFacing = false 
)

◆ ChangeAbilityResistance()

void Barotrauma.Character.ChangeAbilityResistance ( TalentResistanceIdentifier  identifier,
float  value 
)

◆ ChangeStat()

void Barotrauma.Character.ChangeStat ( StatTypes  statType,
float  value 
)

◆ CheckTalents() [1/2]

void Barotrauma.Character.CheckTalents ( AbilityEffectType  abilityEffectType)

◆ CheckTalents() [2/2]

void Barotrauma.Character.CheckTalents ( AbilityEffectType  abilityEffectType,
AbilityObject  abilityObject 
)

◆ ClearInput()

void Barotrauma.Character.ClearInput ( InputType  inputType)

◆ ClearInputs()

void Barotrauma.Character.ClearInputs ( )

◆ ClientEventRead()

virtual void Barotrauma.Character.ClientEventRead ( IReadMessage  msg,
float  sendingTime 
)
virtual

◆ ClientEventWrite()

virtual void Barotrauma.Character.ClientEventWrite ( IWriteMessage  msg,
NetEntityEvent.IData  extraData = null 
)
virtual

◆ ClientReadPosition()

void Barotrauma.Character.ClientReadPosition ( IReadMessage  msg,
float  sendingTime 
)

◆ ClientWriteInput()

void Barotrauma.Character.ClientWriteInput ( in SegmentTableWriter< ClientNetSegment segmentTableWriter,
IWriteMessage  msg 
)

◆ Control()

void Barotrauma.Character.Control ( float  deltaTime,
Camera  cam 
)

◆ ControlLocalPlayer()

void Barotrauma.Character.ControlLocalPlayer ( float  deltaTime,
Camera  cam,
bool  moveCam = true 
)

Control the Character according to player input

Definition at line 280 of file BarotraumaClient/ClientSource/Characters/Character.cs.

◆ Create() [1/4]

static Character Barotrauma.Character.Create ( CharacterInfo  characterInfo,
Vector2  position,
string  seed,
ushort  id = Entity.NullEntityID,
bool  isRemotePlayer = false,
bool  hasAi = true,
RagdollParams  ragdoll = null,
bool  spawnInitialItems = true 
)
static

Create a new character

Parameters
characterInfoThe name, gender, config file, etc of the character.
positionPosition in display units.
seedRNG seed to use if the character config has randomizable parameters.
isRemotePlayerIs the character controlled by a remote player.
hasAiIs the character controlled by AI.
ragdollRagdoll configuration file. If null, will select the default.

Definition at line 1203 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ Create() [2/4]

static Character Barotrauma.Character.Create ( CharacterPrefab  prefab,
Vector2  position,
string  seed,
CharacterInfo  characterInfo = null,
ushort  id = Entity.NullEntityID,
bool  isRemotePlayer = false,
bool  hasAi = true,
bool  createNetworkEvent = true,
RagdollParams  ragdoll = null,
bool  spawnInitialItems = true 
)
static

◆ Create() [3/4]

static Character Barotrauma.Character.Create ( Identifier  speciesName,
Vector2  position,
string  seed,
CharacterInfo  characterInfo = null,
ushort  id = Entity.NullEntityID,
bool  isRemotePlayer = false,
bool  hasAi = true,
bool  createNetworkEvent = true,
RagdollParams  ragdoll = null,
bool  throwErrorIfNotFound = true,
bool  spawnInitialItems = true 
)
static

◆ Create() [4/4]

static Character Barotrauma.Character.Create ( string  speciesName,
Vector2  position,
string  seed,
CharacterInfo  characterInfo = null,
ushort  id = Entity.NullEntityID,
bool  isRemotePlayer = false,
bool  hasAi = true,
bool  createNetworkEvent = true,
RagdollParams  ragdoll = null,
bool  throwErrorIfNotFound = true,
bool  spawnInitialItems = true 
)
static

Create a new character

Parameters
speciesNameName of the species (or the path to the config file)
positionPosition in display units.
seedRNG seed to use if the character config has randomizable parameters.
characterInfoThe name, gender, etc of the character. Only used for humans, and if the parameter is not given, a random CharacterInfo is generated.
idID to assign to the character. If set to 0, automatically find an available ID.
isRemotePlayerIs the character controlled by a remote player.
hasAiIs the character controlled by AI.
createNetworkEventShould clients receive a network event about the creation of this character?
ragdollRagdoll configuration file. If null, will select the default.

Definition at line 1220 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ DamageLimb()

AttackResult Barotrauma.Character.DamageLimb ( Vector2  worldPosition,
Limb  hitLimb,
IEnumerable< Affliction afflictions,
float  stun,
bool  playSound,
Vector2  attackImpulse,
Character  attacker = null,
float  damageMultiplier = 1,
bool  allowStacking = true,
float  penetration = 0f,
bool  shouldImplode = false 
)

◆ DeselectCharacter()

void Barotrauma.Character.DeselectCharacter ( )

◆ DespawnNow()

void Barotrauma.Character.DespawnNow ( bool  createNetworkEvents = true)

◆ DisableLine() [1/2]

void Barotrauma.Character.DisableLine ( Identifier  identifier)

◆ DisableLine() [2/2]

void Barotrauma.Character.DisableLine ( string  identifier)

◆ DoInteractionUpdate()

void Barotrauma.Character.DoInteractionUpdate ( float  deltaTime,
Vector2  mouseSimPos 
)

◆ DoVisibilityCheck()

void Barotrauma.Character.DoVisibilityCheck ( Camera  cam)

◆ Draw()

void Barotrauma.Character.Draw ( SpriteBatch  spriteBatch,
Camera  cam 
)

◆ DrawFront()

virtual void Barotrauma.Character.DrawFront ( SpriteBatch  spriteBatch,
Camera  cam 
)
virtual

◆ DrawGUIMessages()

void Barotrauma.Character.DrawGUIMessages ( SpriteBatch  spriteBatch,
Camera  cam 
)

◆ DrawHUD()

void Barotrauma.Character.DrawHUD ( SpriteBatch  spriteBatch,
Camera  cam,
bool  drawHealth = true 
)

◆ EmulateInput()

void Barotrauma.Character.EmulateInput ( InputType  input)

◆ FindItem()

bool Barotrauma.Character.FindItem ( ref int  itemIndex,
out Item  targetItem,
IEnumerable< Identifier identifiers = null,
bool  ignoreBroken = true,
IEnumerable< Item ignoredItems = null,
IEnumerable< Identifier ignoredContainerIdentifiers = null,
Func< Item, bool >  customPredicate = null,
Func< Item, float >  customPriorityFunction = null,
float  maxItemDistance = 10000,
ISpatialEntity  positionalReference = null 
)

Finds the closest item seeking by identifiers or tags from the world. Ignores items that are outside or in another team's submarine or in a submarine that is not connected to this submarine. Also ignores non-interactable items and items that are taken by someone else. The method is run in steps for performance reasons. So you'll have to provide the reference to the itemIndex. Returns false while running and true when done.

Definition at line 2555 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ FindItemAtPosition()

Item Barotrauma.Character.FindItemAtPosition ( Vector2  simPosition,
float  aimAssistModifier = 0.0f,
Item[]  ignoredItems = null 
)

Finds the front (lowest depth) interactable item at a position. "Interactable" in this case means that the character can "reach" the item.

Parameters
characterThe Character who is looking for the interactable item, only items that are close enough to this character are returned
simPositionThe item at the simPosition, with the lowest depth, is returned
allowFindingNearestItemIf this is true and an item cannot be found at simPosition then a nearest item will be returned if possible
hullIf a hull is specified, only items within that hull are returned

Definition at line 564 of file BarotraumaClient/ClientSource/Characters/Character.cs.

◆ ForgiveAttacker()

void Barotrauma.Character.ForgiveAttacker ( Character  character)

◆ GetAbilityResistance()

float Barotrauma.Character.GetAbilityResistance ( AfflictionPrefab  affliction)

◆ GetAttackContexts()

IEnumerable<AttackContext> Barotrauma.Character.GetAttackContexts ( )

◆ GetCurrentOrder()

Order Barotrauma.Character.GetCurrentOrder ( Order  order)

◆ GetCurrentOrderWithTopPriority()

Order Barotrauma.Character.GetCurrentOrderWithTopPriority ( )

◆ GetDamageDoneByAttacker()

float Barotrauma.Character.GetDamageDoneByAttacker ( Character  otherCharacter)

◆ GetDistanceSqrToClosestPlayer()

float Barotrauma.Character.GetDistanceSqrToClosestPlayer ( )
protected

How far the character is from the closest human player (including spectators)

Definition at line 3523 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ GetDistanceToClosestLimb()

float Barotrauma.Character.GetDistanceToClosestLimb ( Vector2  simPos)

◆ GetDistanceToClosestPlayer()

float Barotrauma.Character.GetDistanceToClosestPlayer ( )
protected

How far the character is from the closest human player (including spectators)

Definition at line 3515 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ GetEquippedItem()

Item Barotrauma.Character.GetEquippedItem ( Identifier tagOrIdentifier = null,
InvSlotType slotType = null 
)

◆ GetFriendlyCrew()

static IEnumerable<Character> Barotrauma.Character.GetFriendlyCrew ( Character  character)
static

◆ GetLeftHandPenalty()

float Barotrauma.Character.GetLeftHandPenalty ( )

◆ GetLegPenalty()

float Barotrauma.Character.GetLegPenalty ( float  startSum = 0)

◆ GetNameColor()

Color Barotrauma.Character.GetNameColor ( )

◆ GetRelativeSimPosition()

Vector2 Barotrauma.Character.GetRelativeSimPosition ( ISpatialEntity  target,
Vector2?  worldPos = null 
)

◆ GetRightHandPenalty()

float Barotrauma.Character.GetRightHandPenalty ( )

◆ GetSkillLevel() [1/2]

float Barotrauma.Character.GetSkillLevel ( Identifier  skillIdentifier)

◆ GetSkillLevel() [2/2]

float Barotrauma.Character.GetSkillLevel ( string  skillIdentifier)

◆ GetSound()

CharacterSound Barotrauma.Character.GetSound ( Func< CharacterSound, bool >  predicate = null,
bool  random = false 
)

Note that when a predicate is provided, the random option uses Linq.Where() extension method, which creates a new collection.

◆ GetStatValue()

float Barotrauma.Character.GetStatValue ( StatTypes  statType,
bool  includeSaved = true 
)

◆ GetTargetMovement()

Vector2 Barotrauma.Character.GetTargetMovement ( )

◆ GetTemporarySpeedReduction()

float Barotrauma.Character.GetTemporarySpeedReduction ( )

Speed reduction from the current limb specific damage. Min 0, max 1.

Definition at line 1928 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ GetVisibleHulls()

List<Hull> Barotrauma.Character.GetVisibleHulls ( )

Returns hulls that are visible to the character, including the current hull. Note that this is not an accurate visibility check, it only checks for open gaps between the adjacent and linked hulls. Can be heavy if used every frame.

Definition at line 5048 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ GiveIdCardTags()

void Barotrauma.Character.GiveIdCardTags ( WayPoint  spawnPoint,
bool  createNetworkEvent = false 
)

◆ GiveJobItems()

void Barotrauma.Character.GiveJobItems ( WayPoint  spawnPoint = null)

◆ GiveMoney()

void Barotrauma.Character.GiveMoney ( int  amount)

Shows visual notification of money gained by the specific player. Useful for mid-mission monetary gains.

Definition at line 5298 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ GiveTalent() [1/3]

bool Barotrauma.Character.GiveTalent ( Identifier  talentIdentifier,
bool  addingFirstTime = true 
)

◆ GiveTalent() [2/3]

bool Barotrauma.Character.GiveTalent ( TalentPrefab  talentPrefab,
bool  addingFirstTime = true 
)

◆ GiveTalent() [3/3]

bool Barotrauma.Character.GiveTalent ( UInt32  talentIdentifier,
bool  addingFirstTime = true 
)

◆ HasAbilityFlag()

bool Barotrauma.Character.HasAbilityFlag ( AbilityFlags  abilityFlag)

◆ HasEquippedItem() [1/2]

bool Barotrauma.Character.HasEquippedItem ( Identifier  tagOrIdentifier,
bool  allowBroken = true,
InvSlotType slotType = null 
)

◆ HasEquippedItem() [2/2]

bool Barotrauma.Character.HasEquippedItem ( Item  item,
InvSlotType slotType = null,
Func< InvSlotType, bool >  predicate = null 
)

◆ HasItem()

bool Barotrauma.Character.HasItem ( Item  item,
bool  requireEquipped = false,
InvSlotType slotType = null 
)

◆ HasJob() [1/2]

bool Barotrauma.Character.HasJob ( Identifier  identifier)

◆ HasJob() [2/2]

bool Barotrauma.Character.HasJob ( string  identifier)

◆ HasRecipeForItem()

bool Barotrauma.Character.HasRecipeForItem ( Identifier  recipeIdentifier)

◆ HasSelectedAnotherSecondaryItem()

bool Barotrauma.Character.HasSelectedAnotherSecondaryItem ( Item  item)

◆ HasStoreAccessForItem()

bool Barotrauma.Character.HasStoreAccessForItem ( ItemPrefab  prefab)

◆ HasTalent()

bool Barotrauma.Character.HasTalent ( Identifier  identifier)

◆ HasTalents()

bool Barotrauma.Character.HasTalents ( )

◆ HasTeamChange()

bool Barotrauma.Character.HasTeamChange ( string  identifier)

◆ HasUnlockedAllTalents()

bool Barotrauma.Character.HasUnlockedAllTalents ( )

◆ IsAnySelectedItem()

bool Barotrauma.Character.IsAnySelectedItem ( Item  item)

Is the item either the primary or the secondary selected item?

Parameters
item
Returns

◆ IsFacing()

bool Barotrauma.Character.IsFacing ( Vector2  targetWorldPos)

A simple check if the character Dir is towards the target or not. Uses the world coordinates.

◆ IsFriendly() [1/2]

static bool Barotrauma.Character.IsFriendly ( Character  me,
Character  other 
)
static

◆ IsFriendly() [2/2]

bool Barotrauma.Character.IsFriendly ( Character  other)

◆ IsInSameRoomAs()

bool Barotrauma.Character.IsInSameRoomAs ( Character  character)

Check if the character is in the same room Room and hull differ in that a room can consist of multiple linked hulls

Definition at line 5248 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ IsItemTakenBySomeoneElse()

bool Barotrauma.Character.IsItemTakenBySomeoneElse ( Item  item)

◆ IsKeyDown()

bool Barotrauma.Character.IsKeyDown ( InputType  inputType)

◆ IsKeyHit()

bool Barotrauma.Character.IsKeyHit ( InputType  inputType)

◆ IsOnFriendlyTeam() [1/4]

static bool Barotrauma.Character.IsOnFriendlyTeam ( Character  me,
Character  other 
)
static

◆ IsOnFriendlyTeam() [2/4]

bool Barotrauma.Character.IsOnFriendlyTeam ( Character  other)

◆ IsOnFriendlyTeam() [3/4]

static bool Barotrauma.Character.IsOnFriendlyTeam ( CharacterTeamType  myTeam,
CharacterTeamType  otherTeam 
)
static

◆ IsOnFriendlyTeam() [4/4]

bool Barotrauma.Character.IsOnFriendlyTeam ( CharacterTeamType  otherTeam)

◆ IsSameSpeciesOrGroup() [1/2]

static bool Barotrauma.Character.IsSameSpeciesOrGroup ( Character  me,
Character  other 
)
static

◆ IsSameSpeciesOrGroup() [2/2]

bool Barotrauma.Character.IsSameSpeciesOrGroup ( Character  other)

◆ IsTargetVisible()

static bool Barotrauma.Character.IsTargetVisible ( ISpatialEntity  target,
ISpatialEntity  seeingEntity,
bool  seeThroughWindows = false,
bool  checkFacing = false 
)
static

◆ Kill()

void Barotrauma.Character.Kill ( CauseOfDeathType  causeOfDeath,
Affliction  causeOfDeathAffliction,
bool  isNetworkMessage = false,
bool  log = true 
)

◆ LoadHeadAttachments()

void Barotrauma.Character.LoadHeadAttachments ( )

◆ LoadTalents()

void Barotrauma.Character.LoadTalents ( )

◆ OnAttackedHandler()

delegate void Barotrauma.Character.OnAttackedHandler ( Character  attacker,
AttackResult  attackResult 
)

◆ OnDeathHandler()

delegate void Barotrauma.Character.OnDeathHandler ( Character  character,
CauseOfDeath  causeOfDeath 
)

◆ OnWearablesChanged()

void Barotrauma.Character.OnWearablesChanged ( )

◆ PlaySound()

void Barotrauma.Character.PlaySound ( CharacterSound.SoundType  soundType,
float  soundIntervalFactor = 1.0f,
float  maxInterval = 0 
)

◆ ReadSpawnData()

static Character Barotrauma.Character.ReadSpawnData ( IReadMessage  inc)
static

◆ RecordKill()

void Barotrauma.Character.RecordKill ( Character  target)

◆ ReleaseSecondaryItem()

void Barotrauma.Character.ReleaseSecondaryItem ( )

◆ ReloadHead()

void Barotrauma.Character.ReloadHead ( int?  headId = null,
int  hairIndex = -1,
int  beardIndex = -1,
int  moustacheIndex = -1,
int  faceAttachmentIndex = -1 
)

◆ Remove()

override void Barotrauma.Character.Remove ( )
virtual

Reimplemented from Barotrauma.Entity.

Definition at line 4779 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ RemoveAbilityFlag()

void Barotrauma.Character.RemoveAbilityFlag ( AbilityFlags  abilityFlag)

◆ RemoveAbilityResistance()

void Barotrauma.Character.RemoveAbilityResistance ( TalentResistanceIdentifier  identifier)

◆ RemoveActiveObjectiveEntity()

void Barotrauma.Character.RemoveActiveObjectiveEntity ( Entity  entity)

◆ RemoveByPrefab()

static void Barotrauma.Character.RemoveByPrefab ( CharacterPrefab  prefab)
static

◆ ResetNetState()

void Barotrauma.Character.ResetNetState ( )

◆ ResetSpeedMultiplier()

void Barotrauma.Character.ResetSpeedMultiplier ( )

◆ Revive()

void Barotrauma.Character.Revive ( bool  removeAfflictions = true,
bool  createNetworkEvent = false 
)

◆ SaveInventory() [1/2]

void Barotrauma.Character.SaveInventory ( )

◆ SaveInventory() [2/2]

static void Barotrauma.Character.SaveInventory ( Inventory  inventory,
XElement  parentElement 
)
static

◆ SelectCharacter()

void Barotrauma.Character.SelectCharacter ( Character  character)

◆ SetAllDamage()

void Barotrauma.Character.SetAllDamage ( float  damageAmount,
float  bleedingDamageAmount,
float  burnDamageAmount 
)

◆ SetAttackTarget()

void Barotrauma.Character.SetAttackTarget ( Limb  attackLimb,
IDamageable  damageTarget,
Vector2  attackPos 
)

◆ SetCustomInteract()

void Barotrauma.Character.SetCustomInteract ( Action< Character, Character onCustomInteract,
LocalizedString  hudText 
)

Set an action that's invoked when another character interacts with this one.

Parameters
onCustomInteractAction invoked when another character interacts with this one. T1 = this character, T2 = the interacting character
hudTextDisplayed on the character when highlighted.

Definition at line 2826 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ SetInput()

void Barotrauma.Character.SetInput ( InputType  inputType,
bool  hit,
bool  held 
)

◆ SetMoney()

void Barotrauma.Character.SetMoney ( int  amount)

◆ SetOrder()

void Barotrauma.Character.SetOrder ( Order  order,
bool  isNewOrder,
bool  speak = true,
bool  force = false 
)

Parameters
forceForce an order to be set for the character, bypassing hearing checks

Definition at line 3742 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ SetOriginalTeam()

void Barotrauma.Character.SetOriginalTeam ( CharacterTeamType  newTeam)

◆ SetStun()

void Barotrauma.Character.SetStun ( float  newStun,
bool  allowStunDecrease = false,
bool  isNetworkMessage = false 
)

◆ ShouldLockHud()

bool Barotrauma.Character.ShouldLockHud ( )

◆ ShowSpeechBubble()

void Barotrauma.Character.ShowSpeechBubble ( float  duration,
Color  color 
)

◆ SpawnInventoryItems()

void Barotrauma.Character.SpawnInventoryItems ( Inventory  inventory,
ContentXElement  itemData 
)

◆ Speak()

void Barotrauma.Character.Speak ( string  message,
ChatMessageType messageType = null,
float  delay = 0.0f,
Identifier  identifier = default,
float  minDurationBetweenSimilar = 0.0f 
)

◆ StackHealthMultiplier()

void Barotrauma.Character.StackHealthMultiplier ( float  val)

◆ StackSpeedMultiplier()

void Barotrauma.Character.StackSpeedMultiplier ( float  val)

◆ StopClimbing()

void Barotrauma.Character.StopClimbing ( )

◆ TeleportTo()

void Barotrauma.Character.TeleportTo ( Vector2  worldPos)

◆ ToString()

override string Barotrauma.Character.ToString ( )

◆ TryAddNewTeamChange()

bool Barotrauma.Character.TryAddNewTeamChange ( string  identifier,
ActiveTeamChange  newTeamChange 
)

◆ TryAdjustAttackerSkill()

void Barotrauma.Character.TryAdjustAttackerSkill ( Character  attacker,
AttackResult  attackResult 
)

◆ TryAdjustHealerSkill()

void Barotrauma.Character.TryAdjustHealerSkill ( Character  healer,
float  healthChange = 0,
Affliction  affliction = null 
)

◆ TryRemoveTeamChange()

bool Barotrauma.Character.TryRemoveTeamChange ( string  identifier)

◆ TrySeverLimbJoints()

void Barotrauma.Character.TrySeverLimbJoints ( Limb  targetLimb,
float  severLimbsProbability,
float  damage,
bool  allowBeheading,
bool  ignoreSeveranceProbabilityModifier = false,
Character  attacker = null 
)

◆ Update()

virtual void Barotrauma.Character.Update ( float  deltaTime,
Camera  cam 
)
virtual

◆ UpdateAll()

static void Barotrauma.Character.UpdateAll ( float  deltaTime,
Camera  cam 
)
static

◆ UpdateAnimAll()

static void Barotrauma.Character.UpdateAnimAll ( float  deltaTime)
static

◆ UpdateHUDProgressBar()

HUDProgressBar Barotrauma.Character.UpdateHUDProgressBar ( object  linkedObject,
Vector2  worldPosition,
float  progress,
Color  emptyColor,
Color  fullColor,
string  textTag = "" 
)

Creates a progress bar that's "linked" to the specified object (or updates an existing one if there's one already linked to the object) The progress bar will automatically fade out after 1 sec if the method hasn't been called during that time

Definition at line 1120 of file BarotraumaClient/ClientSource/Characters/Character.cs.

◆ UpdateLocalCursor()

void Barotrauma.Character.UpdateLocalCursor ( Camera  cam)

◆ UpdateTeam()

void Barotrauma.Character.UpdateTeam ( )

Member Data Documentation

◆ ActiveConversation

ConversationAction Barotrauma.Character.ActiveConversation

◆ activeTeamChanges

readonly Dictionary<string, ActiveTeamChange> Barotrauma.Character.activeTeamChanges = new Dictionary<string, ActiveTeamChange>()
protected

◆ AnimController

readonly AnimController Barotrauma.Character.AnimController

◆ AttachedProjectiles

readonly HashSet<Projectile> Barotrauma.Character.AttachedProjectiles = new HashSet<Projectile>()

◆ CampaignInteractionType

CampaignMode.InteractionType Barotrauma.Character.CampaignInteractionType

◆ CharacterList

readonly List<Character> Barotrauma.Character.CharacterList = new List<Character>()
static

◆ CharacterUpdateInterval

int Barotrauma.Character.CharacterUpdateInterval = 1
static

◆ CombatAction

CombatAction Barotrauma.Character.CombatAction

◆ CurrentHull

Hull Barotrauma.Character.CurrentHull = null

◆ currentTeamChange

ActiveTeamChange Barotrauma.Character.currentTeamChange
protected

◆ DebugDrawInteract

bool Barotrauma.Character.DebugDrawInteract
static

◆ DisableControls

bool Barotrauma.Character.DisableControls
static

◆ DisableHealthWindow

bool Barotrauma.Character.DisableHealthWindow

◆ dontFollowCursor

bool Barotrauma.Character.dontFollowCursor

◆ ExternalHighlight

bool Barotrauma.Character.ExternalHighlight

◆ focusedItem

Item Barotrauma.Character.focusedItem
protected

◆ GodMode

bool Barotrauma.Character.GodMode = false

Godmoded characters cannot receive any afflictions whatsoever

Definition at line 1110 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ healthUpdateTimer

float Barotrauma.Character.healthUpdateTimer

◆ hudInfoTimer

float Barotrauma.Character.hudInfoTimer = 1.0f
protected

◆ hudInfoVisible

bool Barotrauma.Character.hudInfoVisible = false
protected

◆ IsForceRagdolled

bool Barotrauma.Character.IsForceRagdolled

◆ IsRagdolled

bool Barotrauma.Character.IsRagdolled

◆ isSynced

bool Barotrauma.Character.isSynced = false

◆ keys

Key [] Barotrauma.Character.keys
protected

◆ KnockbackCooldown

const float Barotrauma.Character.KnockbackCooldown = 5.0f
static

◆ KnockbackCooldownTimer

float Barotrauma.Character.KnockbackCooldownTimer

◆ LastDamage

AttackResult Barotrauma.Character.LastDamage

◆ LastDamageSource

Entity Barotrauma.Character.LastDamageSource

◆ LastNetworkUpdateID

UInt16 Barotrauma.Character.LastNetworkUpdateID = 0

◆ LastProcessedID

UInt16 Barotrauma.Character.LastProcessedID

ID of the last inputs the server has processed

Definition at line 74 of file BarotraumaShared/SharedSource/Characters/CharacterNetworking.cs.

◆ lastRecvPositionUpdateTime

float Barotrauma.Character.lastRecvPositionUpdateTime
protected

◆ Latchers

readonly HashSet<LatchOntoAI> Barotrauma.Character.Latchers = new HashSet<LatchOntoAI>()

◆ MarkedAsLooted

HashSet<Identifier> Barotrauma.Character.MarkedAsLooted = new()

◆ MaxDragDistance

const float Barotrauma.Character.MaxDragDistance = 200.0f
static

◆ MaxHighlightDistance

const float Barotrauma.Character.MaxHighlightDistance = 150.0f
static

◆ MerchantIdentifier

Identifier Barotrauma.Character.MerchantIdentifier

◆ OnAttacked

OnAttackedHandler Barotrauma.Character.OnAttacked

◆ OnDeath

OnDeathHandler Barotrauma.Character.OnDeath

◆ oxygenAvailable

float Barotrauma.Character.oxygenAvailable
protected

◆ Params

readonly CharacterParams Barotrauma.Character.Params

◆ Prefab

readonly CharacterPrefab Barotrauma.Character.Prefab

◆ PreviousHull

Hull Barotrauma.Character.PreviousHull = null

◆ Properties

readonly Dictionary<Identifier, SerializableProperty> Barotrauma.Character.Properties

◆ RequireConsciousnessForCustomInteract

bool Barotrauma.Character.RequireConsciousnessForCustomInteract = true

◆ Seed

readonly string Barotrauma.Character.Seed

◆ soundTimer

float Barotrauma.Character.soundTimer
protected

◆ TraitorCurrentObjective

LocalizedString Barotrauma.Character.TraitorCurrentObjective = ""

Property Documentation

◆ ActiveObjectiveEntities

IEnumerable<ObjectiveEntity> Barotrauma.Character.ActiveObjectiveEntities
get

◆ AIController

virtual AIController Barotrauma.Character.AIController
get

◆ AimRefPosition

Vector2 Barotrauma.Character.AimRefPosition
get

◆ AIState

AIState Barotrauma.Character.AIState
get

◆ AITurretPriority

float Barotrauma.Character.AITurretPriority
get

◆ AllowCustomInteract

bool Barotrauma.Character.AllowCustomInteract
get

◆ AllowInput

bool Barotrauma.Character.AllowInput
get

◆ Anim

AnimController.Animation??? Barotrauma.Character.Anim
get

Can be used by status effects

Definition at line 788 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ Bleeding

float Barotrauma.Character.Bleeding
get

◆ BloodDecalName

string Barotrauma.Character.BloodDecalName
get

◆ BloodEmitters

IEnumerable<ParticleEmitter> Barotrauma.Character.BloodEmitters
get

◆ Bloodloss

float Barotrauma.Character.Bloodloss
getset

◆ BlurStrength

float Barotrauma.Character.BlurStrength
getset

◆ CameraShake

float????? Barotrauma.Character.CameraShake
getset

Can be used to set camera shake from status effects

Definition at line 133 of file BarotraumaClient/ClientSource/Characters/Character.cs.

◆ CanAim

bool Barotrauma.Character.CanAim
get

◆ CanBeDragged

bool Barotrauma.Character.CanBeDragged
getset

◆ CanBeSelected

bool Barotrauma.Character.CanBeSelected
get

◆ CanEat

bool Barotrauma.Character.CanEat
get

◆ CanInteract

bool Barotrauma.Character.CanInteract
get

◆ CanInventoryBeAccessed

bool Barotrauma.Character.CanInventoryBeAccessed
getset

◆ CanMove

bool Barotrauma.Character.CanMove
get

◆ CanRun

bool Barotrauma.Character.CanRun
get

◆ CanSpeak

bool Barotrauma.Character.CanSpeak
getset

◆ CauseOfDeath

CauseOfDeath Barotrauma.Character.CauseOfDeath
get

◆ CharacterHealth

CharacterHealth Barotrauma.Character.CharacterHealth
get

◆ CharacterTalents

IReadOnlyCollection<CharacterTalent> Barotrauma.Character.CharacterTalents
get

◆ ChromaticAberrationStrength

float Barotrauma.Character.ChromaticAberrationStrength
getset

◆ CollapseEffectStrength

float???????? Barotrauma.Character.CollapseEffectStrength
getset

Can be used by status effects

Definition at line 113 of file BarotraumaClient/ClientSource/Characters/Character.cs.

◆ ConfigPath

string Barotrauma.Character.ConfigPath
get

◆ Controlled

Character? Barotrauma.Character.Controlled
staticgetset

◆ CurrentOrders

List<Order> Barotrauma.Character.CurrentOrders
get

◆ CurrentSpeed

float???? Barotrauma.Character.CurrentSpeed
get

Current speed of the character's collider. Can be used by status effects to check if the character is moving.

Definition at line 934 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ CursorPosition

Vector2 Barotrauma.Character.CursorPosition
getset

◆ CursorWorldPosition

Vector2? Barotrauma.Character.CursorWorldPosition
get

◆ CustomInteractHUDText

LocalizedString Barotrauma.Character.CustomInteractHUDText
get

◆ DamageEmitters

IEnumerable<ParticleEmitter> Barotrauma.Character.DamageEmitters
get

◆ DisabledByEvent

bool Barotrauma.Character.DisabledByEvent
getset

MonsterEvents disable monsters (which includes removing them from the character list, so they essentially "don't exist") until they're ready to spawn

Definition at line 95 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ DisableFocusingOnEntities

bool Barotrauma.Character.DisableFocusingOnEntities
getset

Prevents the character from highlighting items or characters with the cursor, meaning it can't interact with anything but the things it has currently selected/equipped

Definition at line 601 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ DisableImpactDamageTimer

float Barotrauma.Character.DisableImpactDamageTimer
getset

◆ DisableInteract

bool Barotrauma.Character.DisableInteract
getset

Prevents the character from interacting with items or characters

Definition at line 595 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ DisplayName

string? Barotrauma.Character.DisplayName
get

◆ DistortStrength

float Barotrauma.Character.DistortStrength
getset

◆ DoesBleed

bool Barotrauma.Character.DoesBleed
getset

◆ DrawPosition

override Vector2 Barotrauma.Character.DrawPosition
get

◆ EmpVulnerability

float Barotrauma.Character.EmpVulnerability
get

◆ Enabled

bool Barotrauma.Character.Enabled
getset

◆ EnableDespawn

bool Barotrauma.Character.EnableDespawn = true
getset

◆ Faction

Identifier????? Barotrauma.Character.Faction
getset

◆ FocusedCharacter

Character Barotrauma.Character.FocusedCharacter
getset

◆ FocusedItem

Item Barotrauma.Character.FocusedItem
getset

◆ ForceRun

bool Barotrauma.Character.ForceRun
getset

◆ GibEmitters

IEnumerable<ParticleEmitter> Barotrauma.Character.GibEmitters
get

◆ GrainColor

Color Barotrauma.Character.GrainColor
getset

◆ GrainStrength

float Barotrauma.Character.GrainStrength
getset

◆ Group

Identifier Barotrauma.Character.Group
get

◆ HasSelectedAnyItem

bool Barotrauma.Character.HasSelectedAnyItem
get

Has the characters selected a primary or a secondary item?

Definition at line 1003 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ Health

float Barotrauma.Character.Health
get

◆ HealthMultiplier

float Barotrauma.Character.HealthMultiplier = 1
get

Can be used to modify the character's health via StatusEffects

Definition at line 1904 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ HealthPercentage

float Barotrauma.Character.HealthPercentage
get

◆ HealthUpdateInterval

float? Barotrauma.Character.HealthUpdateInterval
getset

◆ HeldItems

IEnumerable<Item>?? Barotrauma.Character.HeldItems
get

Items the character has in their hand slots. Doesn't return nulls and only returns items held in both hands once.

Definition at line 734 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ HideFace

bool? Barotrauma.Character.HideFace
getset

◆ HUDProgressBars

Dictionary<object, HUDProgressBar> Barotrauma.Character.HUDProgressBars
get

◆ HullOxygenPercentage

float??? Barotrauma.Character.HullOxygenPercentage
get

◆ HumanPrefab

HumanPrefab Barotrauma.Character.HumanPrefab
getset

◆ HumanPrefabHealthMultiplier

float Barotrauma.Character.HumanPrefabHealthMultiplier = 1
get

Health multiplier of the human prefab this character is an instance of (if any)

Definition at line 1923 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ IgnoreMeleeWeapons

bool Barotrauma.Character.IgnoreMeleeWeapons
getset

◆ Info

CharacterInfo Barotrauma.Character.Info
getset

◆ InPressure

bool Barotrauma.Character.InPressure
get

Can be used by status effects to check whether the characters is in a high-pressure environment

Definition at line 780 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ Inventory

CharacterInventory Barotrauma.Character.Inventory
get

◆ InvisibleTimer

float Barotrauma.Character.InvisibleTimer
getset

◆ InWater

bool Barotrauma.Character.InWater
get

◆ IsArrested

bool Barotrauma.Character.IsArrested
get

◆ IsAssistant

bool Barotrauma.Character.IsAssistant
get

◆ IsBot

bool Barotrauma.Character.IsBot
get

◆ IsCaptain

bool Barotrauma.Character.IsCaptain
get

◆ IsClimbing

bool Barotrauma.Character.IsClimbing
get

◆ IsCommanding

bool Barotrauma.Character.IsCommanding
get

Is the character player or does it have an active ship command manager (an AI controlled sub)? Bots in the player team are not treated as commanders.

Definition at line 153 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ IsDead

bool Barotrauma.Character.IsDead
getset

◆ IsDisguisedAsHusk

bool Barotrauma.Character.IsDisguisedAsHusk
get

◆ IsDismissed

bool Barotrauma.Character.IsDismissed
get

◆ IsEngineer

bool Barotrauma.Character.IsEngineer
get

◆ IsEscorted

bool Barotrauma.Character.IsEscorted
getset

◆ IsFemale

bool Barotrauma.Character.IsFemale
get

◆ IsFlipped

bool Barotrauma.Character.IsFlipped
get

◆ IsFriendlyNPCTurnedHostile

bool Barotrauma.Character.IsFriendlyNPCTurnedHostile
get

◆ IsHuman

bool Barotrauma.Character.IsHuman
get

◆ IsHumanoid

bool Barotrauma.Character.IsHumanoid
get

◆ IsHusk

bool Barotrauma.Character.IsHusk
get

◆ IsHuskInfected

bool Barotrauma.Character.IsHuskInfected
get

◆ IsImmuneToPressure

bool Barotrauma.Character.IsImmuneToPressure
get

◆ IsIncapacitated

bool Barotrauma.Character.IsIncapacitated
get

◆ IsInFriendlySub

bool Barotrauma.Character.IsInFriendlySub
get

◆ IsInPlayerSub

bool Barotrauma.Character.IsInPlayerSub
get

◆ IsInstigator

bool Barotrauma.Character.IsInstigator
get

◆ IsKiller

bool Barotrauma.Character.IsKiller
get

◆ IsKnockedDown

bool Barotrauma.Character.IsKnockedDown
get

Is the character knocked down regardless whether the technical state is dead, unconcious, paralyzed, or stunned. With stunning, the parameter uses an one second delay before the character is treated as knocked down. The purpose of this is to ignore minor stunning. If you don't want to to ignore any stun, use the Stun property.

Definition at line 4414 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ IsLatched

bool Barotrauma.Character.IsLatched
get

◆ IsLocalPlayer

bool Barotrauma.Character.IsLocalPlayer
get

◆ IsLowInOxygen

bool Barotrauma.Character.IsLowInOxygen
get

◆ IsMachine

bool Barotrauma.Character.IsMachine
get

◆ IsMale

bool Barotrauma.Character.IsMale
get

◆ IsMechanic

bool Barotrauma.Character.IsMechanic
get

◆ IsMedic

bool Barotrauma.Character.IsMedic
get

◆ IsMouseOnUI

bool Barotrauma.Character.IsMouseOnUI
staticget

◆ IsOnPlayerTeam

bool Barotrauma.Character.IsOnPlayerTeam
get

◆ IsOriginallyOnPlayerTeam

bool Barotrauma.Character.IsOriginallyOnPlayerTeam
get

◆ IsPet

bool Barotrauma.Character.IsPet
get

◆ IsPlayer

bool Barotrauma.Character.IsPlayer
get

◆ IsPrisoner

bool Barotrauma.Character.IsPrisoner
get

◆ IsProtectedFromPressure

bool Barotrauma.Character.IsProtectedFromPressure
get

Is the character currently protected from the pressure by immunity/ability or a status effect (e.g. from a diving suit).

Definition at line 5118 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ IsRemotelyControlled

bool Barotrauma.Character.IsRemotelyControlled
get

Is the character controlled remotely (either by another player, or a server-side AIController)

Definition at line 122 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ IsRemotePlayer

bool Barotrauma.Character.IsRemotePlayer
getset

Is the character controlled by another human player (should always be false in single player)

Definition at line 145 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ IsSecurity

bool Barotrauma.Character.IsSecurity
get

◆ IsTraitor

bool Barotrauma.Character.IsTraitor
getset

◆ IsUnconscious

bool Barotrauma.Character.IsUnconscious
get

◆ IsVip

bool Barotrauma.Character.IsVip
get

◆ IsVisible

bool Barotrauma.Character.IsVisible = true
get

Is the character currently visible on the camera. Refresh the value by calling DoVisibilityCheck.

Definition at line 39 of file BarotraumaClient/ClientSource/Characters/Character.cs.

◆ IsWatchman

bool Barotrauma.Character.IsWatchman
get

◆ ItemSelectedDurations

Dictionary<ItemPrefab, double> Barotrauma.Character.ItemSelectedDurations
get

◆ JobIdentifier

Identifier Barotrauma.Character.JobIdentifier
get

◆ Keys

Key [] Barotrauma.Character.Keys
get

◆ LastAttacker

Character Barotrauma.Character.LastAttacker
get

◆ LastAttackers

IEnumerable<Attacker> Barotrauma.Character.LastAttackers
get

◆ LastOrderedCharacter

Character Barotrauma.Character.LastOrderedCharacter
get

◆ LockHands

bool? Barotrauma.Character.LockHands
getset

◆ LogName

string?? Barotrauma.Character.LogName
get

◆ LowPassMultiplier

float Barotrauma.Character.LowPassMultiplier
getset

◆ Mass

float Barotrauma.Character.Mass
get

◆ MaxHealth

float Barotrauma.Character.MaxHealth
get

◆ MaxVitality

float Barotrauma.Character.MaxVitality
get

◆ MemLocalState

List<CharacterStateInfo> Barotrauma.Character.MemLocalState
get

◆ MemState

List<CharacterStateInfo> Barotrauma.Character.MemState
get

◆ Name

string? Barotrauma.Character.Name
get

◆ NeedsAir

bool Barotrauma.Character.NeedsAir
getset

◆ NeedsOxygen

bool Barotrauma.Character.NeedsOxygen
get

◆ NeedsWater

bool Barotrauma.Character.NeedsWater
getset

◆ Noise

float Barotrauma.Character.Noise
getset

◆ ObstructVision

bool? Barotrauma.Character.ObstructVision
getset

◆ OriginalTeamID

CharacterTeamType?? Barotrauma.Character.OriginalTeamID
get

◆ OverrideMovement

Vector2? Barotrauma.Character.OverrideMovement
getset

◆ Oxygen

float Barotrauma.Character.Oxygen
getset

◆ OxygenAvailable

float Barotrauma.Character.OxygenAvailable
getset

◆ PickingItem

Item Barotrauma.Character.PickingItem
getset

◆ PoisonVulnerability

float Barotrauma.Character.PoisonVulnerability
get

◆ Position

override Vector2 Barotrauma.Character.Position
get

◆ PressureProtection

float Barotrauma.Character.PressureProtection
getset

◆ PressureTimer

float Barotrauma.Character.PressureTimer
get

◆ PropulsionSpeedMultiplier

float Barotrauma.Character.PropulsionSpeedMultiplier
getset

Can be used to modify the speed at which Propulsion ItemComponents move the character via StatusEffects (e.g. heavy suit can slow down underwater scooters)

Definition at line 1872 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ RadialDistortStrength

float Barotrauma.Character.RadialDistortStrength
getset

◆ SecondLastOrderedCharacter

Character Barotrauma.Character.SecondLastOrderedCharacter
get

◆ SelectedBy

Character Barotrauma.Character.SelectedBy
getset

◆ SelectedCharacter

Character Barotrauma.Character.SelectedCharacter
getset

◆ SelectedItem

Item????????? Barotrauma.Character.SelectedItem
getset

The primary selected item. It can be any device that character interacts with. This excludes items like ladders and chairs which are assigned to SelectedSecondaryItem.

Definition at line 943 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ SelectedSecondaryItem

Item Barotrauma.Character.SelectedSecondaryItem
getset

The secondary selected item. It's an item other than a device (see SelectedItem), e.g. a ladder or a chair.

Definition at line 998 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ SerializableProperties

Dictionary<Identifier, SerializableProperty> Barotrauma.Character.SerializableProperties
get

◆ SimPosition

override Vector2? Barotrauma.Character.SimPosition
get

◆ SmoothedCursorPosition

Vector2 Barotrauma.Character.SmoothedCursorPosition
get

◆ SpeciesName

Identifier Barotrauma.Character.SpeciesName
get

◆ SpeechImpediment

float Barotrauma.Character.SpeechImpediment
getset

◆ SpeedMultiplier

float Barotrauma.Character.SpeedMultiplier = 1
get

Can be used to modify the character's speed via StatusEffects

Definition at line 1864 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ Stun

float? Barotrauma.Character.Stun
getset

◆ TeamID

CharacterTeamType Barotrauma.Character.TeamID
getset

◆ UniqueNameColor

Color? Barotrauma.Character.UniqueNameColor = null
getset

◆ Unkillable

bool Barotrauma.Character.Unkillable
getset

◆ UseHealthWindow

bool Barotrauma.Character.UseHealthWindow
getset

Is the health interface available on this character? Can be used by status effects

Definition at line 1121 of file BarotraumaShared/SharedSource/Characters/Character.cs.

◆ UseHullOxygen

bool Barotrauma.Character.UseHullOxygen = true
getset

◆ VariantOf

Identifier Barotrauma.Character.VariantOf
get

◆ ViewTarget

Entity Barotrauma.Character.ViewTarget
getset

◆ Visibility

float Barotrauma.Character.Visibility
getset

◆ Vitality

float Barotrauma.Character.Vitality
get

◆ Wallet

Wallet Barotrauma.Character.Wallet
getset

◆ WasFullHealth

bool Barotrauma.Character.WasFullHealth
get

Was the character in full health at the beginning of the frame?

Definition at line 872 of file BarotraumaShared/SharedSource/Characters/Character.cs.