Barotrauma Client Doc
Barotrauma.Items.Components.ItemComponent Class Reference

The base class for components holding the different functionalities of the item More...

Inheritance diagram for Barotrauma.Items.Components.ItemComponent:
Barotrauma.ISerializableEntity Barotrauma.ISerializableEntity Barotrauma.Items.Components.ArithmeticComponent Barotrauma.Items.Components.BooleanOperatorComponent Barotrauma.Items.Components.ButtonTerminal Barotrauma.Items.Components.ButtonTerminal Barotrauma.Items.Components.ColorComponent Barotrauma.Items.Components.ConnectionPanel Barotrauma.Items.Components.ConnectionPanel Barotrauma.Items.Components.Controller Barotrauma.Items.Components.Controller Barotrauma.Items.Components.CustomInterface Barotrauma.Items.Components.DelayComponent Barotrauma.Items.Components.DockingPort Barotrauma.Items.Components.DockingPort Barotrauma.Items.Components.EqualsComponent Barotrauma.Items.Components.ExponentiationComponent Barotrauma.Items.Components.FunctionComponent Barotrauma.Items.Components.GeneticMaterial Barotrauma.Items.Components.GeneticMaterial Barotrauma.Items.Components.ItemContainer Barotrauma.Items.Components.ItemContainer Barotrauma.Items.Components.ItemLabel Barotrauma.Items.Components.ItemLabel Barotrauma.Items.Components.Ladder Barotrauma.Items.Components.Ladder Barotrauma.Items.Components.LevelResource Barotrauma.Items.Components.LevelResource Barotrauma.Items.Components.MemoryComponent Barotrauma.Items.Components.MemoryComponent Barotrauma.Items.Components.ModuloComponent Barotrauma.Items.Components.MotionSensor Barotrauma.Items.Components.NameTag Barotrauma.Items.Components.NotComponent Barotrauma.Items.Components.OscillatorComponent Barotrauma.Items.Components.OutpostTerminal Barotrauma.Items.Components.OutpostTerminal Barotrauma.Items.Components.OxygenDetector Barotrauma.Items.Components.Pickable Barotrauma.Items.Components.Powered Barotrauma.Items.Components.Powered Barotrauma.Items.Components.Projectile Barotrauma.Items.Components.Projectile Barotrauma.Items.Components.Propulsion Barotrauma.Items.Components.Quality Barotrauma.Items.Components.Quality Barotrauma.Items.Components.RangedWeapon Barotrauma.Items.Components.RangedWeapon Barotrauma.Items.Components.RegExFindComponent Barotrauma.Items.Components.RemoteController Barotrauma.Items.Components.RemoteController Barotrauma.Items.Components.RepairTool Barotrauma.Items.Components.Repairable Barotrauma.Items.Components.Repairable Barotrauma.Items.Components.Rope Barotrauma.Items.Components.Rope Barotrauma.Items.Components.Scanner Barotrauma.Items.Components.Scanner Barotrauma.Items.Components.SignalCheckComponent Barotrauma.Items.Components.SmokeDetector Barotrauma.Items.Components.StatusHUD Barotrauma.Items.Components.StatusHUD Barotrauma.Items.Components.StringComponent Barotrauma.Items.Components.Terminal Barotrauma.Items.Components.Terminal Barotrauma.Items.Components.TriggerComponent Barotrauma.Items.Components.TriggerComponent Barotrauma.Items.Components.TrigonometricFunctionComponent Barotrauma.Items.Components.Vent Barotrauma.Items.Components.WaterDetector Barotrauma.Items.Components.WifiComponent Barotrauma.Items.Components.Wire Barotrauma.Items.Components.Wire

Classes

class  GUILayoutSettings
 
interface  IEventData
 

Public Member Functions

readonly record struct ItemUseInfo (Item Item, Character User)
 
 ItemComponent (Item item, ContentXElement element)
 
void SetRequiredItems (ContentXElement element, bool allowEmpty=false)
 
virtual void Move (Vector2 amount, bool ignoreContacts=false)
 
virtual bool Pick (Character picker)
 a Character has picked the item More...
 
virtual bool Select (Character character)
 
virtual void Drop (Character dropper, bool setTransform=true)
 a Character has dropped the item More...
 
virtual bool CrewAIOperate (float deltaTime, Character character, AIObjectiveOperateItem objective)
 
Returns
true if the operation was completed
More...
 
virtual void Update (float deltaTime, Camera cam)
 
virtual void UpdateBroken (float deltaTime, Camera cam)
 
virtual bool Use (float deltaTime, Character character=null)
 
virtual bool SecondaryUse (float deltaTime, Character character=null)
 
virtual void Equip (Character character)
 
virtual void Unequip (Character character)
 
virtual void ReceiveSignal (Signal signal, Connection connection)
 
virtual bool Combine (Item item, Character user)
 
void Remove ()
 
void ShallowRemove ()
 Remove the component so that it doesn't appear to exist in the game world (stop sounds, remove bodies etc) but don't reset anything that's required for cloning the item More...
 
bool HasRequiredSkills (Character character)
 
bool HasRequiredSkills (Character character, out Skill insufficientSkill)
 
virtual float GetSkillMultiplier ()
 
float DegreeOfSuccess (Character character)
 Returns 0.0f-1.0f based on how well the Character can use the itemcomponent More...
 
float DegreeOfSuccess (Character character, List< Skill > requiredSkills)
 Returns 0.0f-1.0f based on how well the Character can use the itemcomponent More...
 
virtual void FlipX (bool relativeToSub)
 
virtual void FlipY (bool relativeToSub)
 
bool IsEmpty (Character user)
 Shorthand for !HasRequiredContainedItems() More...
 
bool HasRequiredContainedItems (Character user, bool addMessage, LocalizedString msg=null)
 
virtual bool HasAccess (Character character)
 Only checks if any of the Picked requirements are matched (used for checking id card(s)). Much simpler and a bit different than HasRequiredItems. More...
 
virtual bool HasRequiredItems (Character character, bool addMessage, LocalizedString msg=null)
 
void ApplyStatusEffects (ActionType type, float deltaTime, Character character=null, Limb targetLimb=null, Entity useTarget=null, Character user=null, Vector2? worldPosition=null, float afflictionMultiplier=1.0f)
 
virtual void Load (ContentXElement componentElement, bool usePrefabValues, IdRemap idRemap)
 
virtual void OnMapLoaded ()
 Called when all items have been loaded. Use to initialize connections between items. More...
 
virtual void OnItemLoaded ()
 Called when all the components of the item have been loaded. Use to initialize connections between components and such. More...
 
virtual void OnScaleChanged ()
 
virtual void OnInventoryChanged ()
 Called when the item has an ItemContainer and the contents inside of it changed. More...
 
virtual XElement Save (XElement parentElement)
 
virtual void Reset ()
 
virtual void ParseMsg ()
 
virtual bool ValidateEventData (NetEntityEvent.IData data)
 
ItemComponent GetReplacementOrThis ()
 
bool NeedsSoundUpdate ()
 
void UpdateSounds ()
 
void PlaySound (ActionType type, Character user=null)
 
void StopLoopingSound ()
 
void StopSounds (ActionType type)
 
virtual bool ShouldDrawHUD (Character character)
 
ItemComponent GetLinkUIToComponent ()
 
virtual void DrawHUD (SpriteBatch spriteBatch, Character character)
 
virtual void AddToGUIUpdateList (int order=0)
 
void UpdateHUD (Character character, float deltaTime, Camera cam)
 
virtual void UpdateHUDComponentSpecific (Character character, float deltaTime, Camera cam)
 
virtual void UpdateEditing (float deltaTime)
 
virtual void CreateEditingHUD (SerializableEntityEditor editor)
 
virtual void OnPlayerSkillsChanged ()
 
virtual void AddTooltipInfo (ref LocalizedString name, ref LocalizedString description)
 

Static Public Member Functions

static ItemComponent Load (ContentXElement element, Item item, bool errorMessages=true)
 

Public Attributes

bool WasUsed
 
readonly Dictionary< ActionType, List< StatusEffect > > statusEffectLists
 
Dictionary< RelatedItem.RelationType, List< RelatedItem > > requiredItems
 
readonly List< RelatedItemDisabledRequiredItems = new List<RelatedItem>()
 
List< SkillrequiredSkills
 
readonly ContentXElement originalElement
 
Action< bool > OnActiveStateChanged
 
List< PropertyConditionalIsActiveConditionals
 
readonly NamedEvent< ItemUseInfoOnUsed = new()
 
readonly bool InheritStatusEffects
 
float IsActiveTimer
 
ItemComponent ReplacedBy
 

Protected Member Functions

virtual void ShallowRemoveComponentSpecific ()
 
virtual void RemoveComponentSpecific ()
 
string GetTextureDirectory (ContentXElement subElement)
 
ExtractEventData< T > (NetEntityEvent.IData data)
 
bool TryExtractEventData< T > (NetEntityEvent.IData data, out T componentData)
 
AIObjectiveContainItem AIContainItems< T > (ItemContainer container, Character character, AIObjective currentObjective, int itemCount, bool equip, bool removeEmpty, bool spawnItemIfNotFound=false, bool dropItemOnDeselected=false)
 
void ReleaseGuiFrame ()
 
void ReloadGuiFrame ()
 
void TryCreateDragHandle ()
 
virtual void CreateGUI ()
 Overload this method and implement. The method is automatically called when the resolution changes. More...
 
void StartDelayedCorrection (IReadMessage buffer, float sendingTime, bool waitForMidRoundSync=false)
 
void OnGUIParentChanged (RectTransform newParent)
 Launches when the parent of the GuiFrame is changed. More...
 
virtual void OnResolutionChanged ()
 

Protected Attributes

Item item
 
string name
 
bool characterUsable
 
bool canBePicked
 
bool canBeSelected
 
bool canBeCombined
 
bool removeOnCombined
 
CoroutineHandle delayedCorrectionCoroutine
 
float aiUpdateTimer
 
float correctionTimer
 

Static Protected Attributes

const float CorrectionDelay = 1.0f
 
const float AIUpdateInterval = 0.2f
 

Properties

ItemComponent Parent [get, set]
 
bool InheritParentIsActive [get, set]
 
virtual bool DontTransferInventoryBetweenSubs [get]
 If enabled, the contents of the item are not transferred when the player transfers items between subs. Use this if this component uses item containers in a way where removing the item from the container via external means would cause problems. More...
 
virtual bool DisallowSellingItemsFromContainer [get]
 If enabled, the items inside any of the item containers on this item cannot be sold at an outpost. Use in similar cases as DontTransferInventoryBetweenSubs. More...
 
float PickingTime [get, set]
 
string PickingMsg [get, set]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get, protected set]
 
virtual bool? IsActive [get, set]
 
PropertyConditional.LogicalOperatorType IsActiveConditionalComparison [get, set]
 
bool Drawable [get, set]
 
bool CanBePicked [get, set]
 
bool DrawHudWhenEquipped [get, protected set]
 
bool LockGuiFramePosition [get, set]
 
Point GuiFrameOffset [get, set]
 
bool CanBeSelected [get, set]
 
bool CanBeCombined [get, set]
 
bool RemoveOnCombined [get, set]
 
bool CharacterUsable [get, set]
 
bool AllowInGameEditing [get, set]
 
InputType PickKey [get, protected set]
 
InputType SelectKey [get, protected set]
 
bool DeleteOnUse [get, set]
 
Item Item [get]
 
string Name [get]
 
string Msg [get, set]
 
LocalizedString DisplayMsg [get, set]
 
float CombatPriority [get]
 
int ManuallySelectedSound [get]
 Which sound should be played when manual sound selection type is selected? Not [Editable] because we don't want this visible in the editor for every component. More...
 
float Speed [get]
 Can be used by status effects or conditionals to the speed of the item More...
 
virtual bool UpdateWhenInactive [get]
 
bool HasSounds [get]
 
bool[] HasSoundsOfType [get]
 
virtual bool RecreateGUIOnResolutionChange [get]
 
GUILayoutSettings DefaultLayout [get, protected set]
 
GUILayoutSettings AlternativeLayout [get, protected set]
 
GUIFrame GuiFrame [get, set]
 
bool AllowUIOverlap [get, set]
 
string LinkUIToComponent [get, set]
 
int HudPriority [get]
 
int HudLayer [get]
 
bool?? UseAlternativeLayout [get, set]
 
- Properties inherited from Barotrauma.ISerializableEntity
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 

Detailed Description

The base class for components holding the different functionalities of the item

Definition at line 34 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

Constructor & Destructor Documentation

◆ ItemComponent()

Barotrauma.Items.Components.ItemComponent.ItemComponent ( Item  item,
ContentXElement  element 
)

Member Function Documentation

◆ AddToGUIUpdateList()

virtual void Barotrauma.Items.Components.ItemComponent.AddToGUIUpdateList ( int  order = 0)
virtual

◆ AddTooltipInfo()

virtual void Barotrauma.Items.Components.ItemComponent.AddTooltipInfo ( ref LocalizedString  name,
ref LocalizedString  description 
)
virtual

◆ AIContainItems< T >()

AIObjectiveContainItem Barotrauma.Items.Components.ItemComponent.AIContainItems< T > ( ItemContainer  container,
Character  character,
AIObjective  currentObjective,
int  itemCount,
bool  equip,
bool  removeEmpty,
bool  spawnItemIfNotFound = false,
bool  dropItemOnDeselected = false 
)
protected
Type Constraints
T :ItemComponent 

Definition at line 1172 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ ApplyStatusEffects()

void Barotrauma.Items.Components.ItemComponent.ApplyStatusEffects ( ActionType  type,
float  deltaTime,
Character  character = null,
Limb  targetLimb = null,
Entity  useTarget = null,
Character  user = null,
Vector2?  worldPosition = null,
float  afflictionMultiplier = 1.0f 
)

◆ Combine()

virtual bool Barotrauma.Items.Components.ItemComponent.Combine ( Item  item,
Character  user 
)
virtual

◆ CreateEditingHUD()

virtual void Barotrauma.Items.Components.ItemComponent.CreateEditingHUD ( SerializableEntityEditor  editor)
virtual

◆ CreateGUI()

◆ CrewAIOperate()

virtual bool Barotrauma.Items.Components.ItemComponent.CrewAIOperate ( float  deltaTime,
Character  character,
AIObjectiveOperateItem  objective 
)
virtual

◆ DegreeOfSuccess() [1/2]

float Barotrauma.Items.Components.ItemComponent.DegreeOfSuccess ( Character  character)

Returns 0.0f-1.0f based on how well the Character can use the itemcomponent

Returns
0.5f if all the skills meet the skill requirements exactly, 1.0f if they're way above and 0.0f if way less

Definition at line 699 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ DegreeOfSuccess() [2/2]

float Barotrauma.Items.Components.ItemComponent.DegreeOfSuccess ( Character  character,
List< Skill requiredSkills 
)

Returns 0.0f-1.0f based on how well the Character can use the itemcomponent

Returns
0.5f if all the skills meet the skill requirements exactly, 1.0f if they're way above and 0.0f if way less

Definition at line 708 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ DrawHUD()

◆ Drop()

◆ Equip()

◆ ExtractEventData< T >()

T Barotrauma.Items.Components.ItemComponent.ExtractEventData< T > ( NetEntityEvent.IData  data)
protected
Type Constraints
T :IEventData 
T :TryExtractEventData 
T :data 
T :out 
T :T 
T :componentData 
T :componentData 
T :throw 
T :new 
T :Exception 
T :Malformed 
T :item 
T :component 
T :state 
T :event 
T :for 

Definition at line 1149 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ FlipX()

◆ FlipY()

◆ GetLinkUIToComponent()

ItemComponent Barotrauma.Items.Components.ItemComponent.GetLinkUIToComponent ( )

◆ GetReplacementOrThis()

ItemComponent Barotrauma.Items.Components.ItemComponent.GetReplacementOrThis ( )

◆ GetSkillMultiplier()

virtual float Barotrauma.Items.Components.ItemComponent.GetSkillMultiplier ( )
virtual

◆ GetTextureDirectory()

string Barotrauma.Items.Components.ItemComponent.GetTextureDirectory ( ContentXElement  subElement)
protected

◆ HasAccess()

virtual bool Barotrauma.Items.Components.ItemComponent.HasAccess ( Character  character)
virtual

Only checks if any of the Picked requirements are matched (used for checking id card(s)). Much simpler and a bit different than HasRequiredItems.

Reimplemented in Barotrauma.Items.Components.Controller, and Barotrauma.Items.Components.Door.

Definition at line 766 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ HasRequiredContainedItems()

bool Barotrauma.Items.Components.ItemComponent.HasRequiredContainedItems ( Character  user,
bool  addMessage,
LocalizedString  msg = null 
)

◆ HasRequiredItems()

virtual bool Barotrauma.Items.Components.ItemComponent.HasRequiredItems ( Character  character,
bool  addMessage,
LocalizedString  msg = null 
)
virtual

◆ HasRequiredSkills() [1/2]

bool Barotrauma.Items.Components.ItemComponent.HasRequiredSkills ( Character  character)

◆ HasRequiredSkills() [2/2]

bool Barotrauma.Items.Components.ItemComponent.HasRequiredSkills ( Character  character,
out Skill  insufficientSkill 
)

◆ IsEmpty()

bool Barotrauma.Items.Components.ItemComponent.IsEmpty ( Character  user)

Shorthand for !HasRequiredContainedItems()

◆ ItemUseInfo()

readonly record struct Barotrauma.Items.Components.ItemComponent.ItemUseInfo ( Item  Item,
Character  User 
)

◆ Load() [1/2]

◆ Load() [2/2]

static ItemComponent Barotrauma.Items.Components.ItemComponent.Load ( ContentXElement  element,
Item  item,
bool  errorMessages = true 
)
static

◆ Move()

◆ NeedsSoundUpdate()

bool Barotrauma.Items.Components.ItemComponent.NeedsSoundUpdate ( )

◆ OnGUIParentChanged()

void Barotrauma.Items.Components.ItemComponent.OnGUIParentChanged ( RectTransform  newParent)
protected

Launches when the parent of the GuiFrame is changed.

Definition at line 747 of file BarotraumaClient/ClientSource/Items/Components/ItemComponent.cs.

◆ OnInventoryChanged()

virtual void Barotrauma.Items.Components.ItemComponent.OnInventoryChanged ( )
virtual

Called when the item has an ItemContainer and the contents inside of it changed.

Definition at line 987 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ OnItemLoaded()

virtual void Barotrauma.Items.Components.ItemComponent.OnItemLoaded ( )
virtual

◆ OnMapLoaded()

◆ OnPlayerSkillsChanged()

virtual void Barotrauma.Items.Components.ItemComponent.OnPlayerSkillsChanged ( )
virtual

◆ OnResolutionChanged()

◆ OnScaleChanged()

virtual void Barotrauma.Items.Components.ItemComponent.OnScaleChanged ( )
virtual

◆ ParseMsg()

virtual void Barotrauma.Items.Components.ItemComponent.ParseMsg ( )
virtual

◆ Pick()

◆ PlaySound()

void Barotrauma.Items.Components.ItemComponent.PlaySound ( ActionType  type,
Character  user = null 
)

◆ ReceiveSignal()

virtual void Barotrauma.Items.Components.ItemComponent.ReceiveSignal ( Signal  signal,
Connection  connection 
)
virtual

Reimplemented in Barotrauma.Items.Components.Turret, Barotrauma.Items.Components.TriggerComponent, Barotrauma.Items.Components.WifiComponent, Barotrauma.Items.Components.TrigonometricFunctionComponent, Barotrauma.Items.Components.Terminal, Barotrauma.Items.Components.StringComponent, Barotrauma.Items.Components.SignalCheckComponent, Barotrauma.Items.Components.RelayComponent, Barotrauma.Items.Components.RegExFindComponent, Barotrauma.Items.Components.OscillatorComponent, Barotrauma.Items.Components.NotComponent, Barotrauma.Items.Components.ModuloComponent, Barotrauma.Items.Components.MemoryComponent, Barotrauma.Items.Components.LightComponent, Barotrauma.Items.Components.GreaterComponent, Barotrauma.Items.Components.FunctionComponent, Barotrauma.Items.Components.ExponentiationComponent, Barotrauma.Items.Components.EqualsComponent, Barotrauma.Items.Components.DelayComponent, Barotrauma.Items.Components.ConnectionPanel, Barotrauma.Items.Components.ColorComponent, Barotrauma.Items.Components.BooleanOperatorComponent, Barotrauma.Items.Components.ArithmeticComponent, Barotrauma.Items.Components.Repairable, Barotrauma.Items.Components.PowerTransfer, Barotrauma.Items.Components.PowerContainer, Barotrauma.Items.Components.Steering, Barotrauma.Items.Components.Sonar, Barotrauma.Items.Components.Reactor, Barotrauma.Items.Components.Pump, Barotrauma.Items.Components.Engine, Barotrauma.Items.Components.ItemLabel, Barotrauma.Items.Components.ItemContainer, Barotrauma.Items.Components.Holdable, Barotrauma.Items.Components.ElectricalDischarger, Barotrauma.Items.Components.Door, Barotrauma.Items.Components.DockingPort, and Barotrauma.Items.Components.MiniMap.

Definition at line 520 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ ReleaseGuiFrame()

void Barotrauma.Items.Components.ItemComponent.ReleaseGuiFrame ( )
protected

◆ ReloadGuiFrame()

void Barotrauma.Items.Components.ItemComponent.ReloadGuiFrame ( )
protected

◆ Remove()

void Barotrauma.Items.Components.ItemComponent.Remove ( )

◆ RemoveComponentSpecific()

◆ Reset()

virtual void Barotrauma.Items.Components.ItemComponent.Reset ( )
virtual

◆ Save()

◆ SecondaryUse()

◆ Select()

◆ SetRequiredItems()

void Barotrauma.Items.Components.ItemComponent.SetRequiredItems ( ContentXElement  element,
bool  allowEmpty = false 
)

◆ ShallowRemove()

void Barotrauma.Items.Components.ItemComponent.ShallowRemove ( )

Remove the component so that it doesn't appear to exist in the game world (stop sounds, remove bodies etc) but don't reset anything that's required for cloning the item

Definition at line 647 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ ShallowRemoveComponentSpecific()

virtual void Barotrauma.Items.Components.ItemComponent.ShallowRemoveComponentSpecific ( )
protectedvirtual

◆ ShouldDrawHUD()

virtual bool Barotrauma.Items.Components.ItemComponent.ShouldDrawHUD ( Character  character)
virtual

◆ StartDelayedCorrection()

void Barotrauma.Items.Components.ItemComponent.StartDelayedCorrection ( IReadMessage  buffer,
float  sendingTime,
bool  waitForMidRoundSync = false 
)
protected

◆ StopLoopingSound()

void Barotrauma.Items.Components.ItemComponent.StopLoopingSound ( )

◆ StopSounds()

void Barotrauma.Items.Components.ItemComponent.StopSounds ( ActionType  type)

◆ TryCreateDragHandle()

void Barotrauma.Items.Components.ItemComponent.TryCreateDragHandle ( )
protected

◆ TryExtractEventData< T >()

bool Barotrauma.Items.Components.ItemComponent.TryExtractEventData< T > ( NetEntityEvent.IData  data,
out T  componentData 
)
protected

◆ Unequip()

◆ Update()

virtual void Barotrauma.Items.Components.ItemComponent.Update ( float  deltaTime,
Camera  cam 
)
virtual

Reimplemented in Barotrauma.Items.Components.Wearable, Barotrauma.Items.Components.Turret, Barotrauma.Items.Components.TriggerComponent, Barotrauma.Items.Components.Wire, Barotrauma.Items.Components.WifiComponent, Barotrauma.Items.Components.WaterDetector, Barotrauma.Items.Components.TrigonometricFunctionComponent, Barotrauma.Items.Components.StringComponent, Barotrauma.Items.Components.SmokeDetector, Barotrauma.Items.Components.RelayComponent, Barotrauma.Items.Components.RegExFindComponent, Barotrauma.Items.Components.OxygenDetector, Barotrauma.Items.Components.OscillatorComponent, Barotrauma.Items.Components.NotComponent, Barotrauma.Items.Components.MotionSensor, Barotrauma.Items.Components.MemoryComponent, Barotrauma.Items.Components.LightComponent, Barotrauma.Items.Components.GreaterComponent, Barotrauma.Items.Components.EqualsComponent, Barotrauma.Items.Components.DelayComponent, Barotrauma.Items.Components.CustomInterface, Barotrauma.Items.Components.ConnectionPanel, Barotrauma.Items.Components.ColorComponent, Barotrauma.Items.Components.BooleanOperatorComponent, Barotrauma.Items.Components.ArithmeticComponent, Barotrauma.Items.Components.Scanner, Barotrauma.Items.Components.Rope, Barotrauma.Items.Components.Repairable, Barotrauma.Items.Components.RemoteController, Barotrauma.Items.Components.Projectile, Barotrauma.Items.Components.PowerTransfer, Barotrauma.Items.Components.Powered, Barotrauma.Items.Components.PowerContainer, Barotrauma.Items.Components.Vent, Barotrauma.Items.Components.Steering, Barotrauma.Items.Components.SonarTransducer, Barotrauma.Items.Components.Sonar, Barotrauma.Items.Components.Reactor, Barotrauma.Items.Components.Pump, Barotrauma.Items.Components.OxygenGenerator, Barotrauma.Items.Components.MiniMap, Barotrauma.Items.Components.Fabricator, Barotrauma.Items.Components.Engine, Barotrauma.Items.Components.Deconstructor, Barotrauma.Items.Components.Controller, Barotrauma.Items.Components.ItemContainer, Barotrauma.Items.Components.Throwable, Barotrauma.Items.Components.RepairTool, Barotrauma.Items.Components.RangedWeapon, Barotrauma.Items.Components.Propulsion, Barotrauma.Items.Components.MeleeWeapon, Barotrauma.Items.Components.LevelResource, Barotrauma.Items.Components.Holdable, Barotrauma.Items.Components.GeneticMaterial, Barotrauma.Items.Components.ElectricalDischarger, Barotrauma.Items.Components.Door, Barotrauma.Items.Components.DockingPort, Barotrauma.Items.Components.StatusHUD, Barotrauma.Items.Components.OutpostTerminal, and Barotrauma.Items.Components.ItemLabel.

Definition at line 488 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ UpdateBroken()

◆ UpdateEditing()

virtual void Barotrauma.Items.Components.ItemComponent.UpdateEditing ( float  deltaTime)
virtual

◆ UpdateHUD()

void Barotrauma.Items.Components.ItemComponent.UpdateHUD ( Character  character,
float  deltaTime,
Camera  cam 
)

◆ UpdateHUDComponentSpecific()

◆ UpdateSounds()

void Barotrauma.Items.Components.ItemComponent.UpdateSounds ( )

◆ Use()

◆ ValidateEventData()

virtual bool Barotrauma.Items.Components.ItemComponent.ValidateEventData ( NetEntityEvent.IData  data)
virtual

Member Data Documentation

◆ AIUpdateInterval

const float Barotrauma.Items.Components.ItemComponent.AIUpdateInterval = 0.2f
staticprotected

◆ aiUpdateTimer

float Barotrauma.Items.Components.ItemComponent.aiUpdateTimer
protected

◆ canBeCombined

bool Barotrauma.Items.Components.ItemComponent.canBeCombined
protected

◆ canBePicked

bool Barotrauma.Items.Components.ItemComponent.canBePicked
protected

◆ canBeSelected

bool Barotrauma.Items.Components.ItemComponent.canBeSelected
protected

◆ characterUsable

bool Barotrauma.Items.Components.ItemComponent.characterUsable
protected

◆ CorrectionDelay

const float Barotrauma.Items.Components.ItemComponent.CorrectionDelay = 1.0f
staticprotected

◆ correctionTimer

float Barotrauma.Items.Components.ItemComponent.correctionTimer
protected

◆ delayedCorrectionCoroutine

CoroutineHandle Barotrauma.Items.Components.ItemComponent.delayedCorrectionCoroutine
protected

◆ DisabledRequiredItems

readonly List<RelatedItem> Barotrauma.Items.Components.ItemComponent.DisabledRequiredItems = new List<RelatedItem>()

◆ InheritStatusEffects

readonly bool Barotrauma.Items.Components.ItemComponent.InheritStatusEffects

◆ IsActiveConditionals

List<PropertyConditional> Barotrauma.Items.Components.ItemComponent.IsActiveConditionals

◆ IsActiveTimer

float Barotrauma.Items.Components.ItemComponent.IsActiveTimer

◆ item

Item Barotrauma.Items.Components.ItemComponent.item
protected

◆ name

string Barotrauma.Items.Components.ItemComponent.name
protected

◆ OnActiveStateChanged

Action<bool> Barotrauma.Items.Components.ItemComponent.OnActiveStateChanged

◆ OnUsed

readonly NamedEvent<ItemUseInfo> Barotrauma.Items.Components.ItemComponent.OnUsed = new()

◆ originalElement

readonly ContentXElement Barotrauma.Items.Components.ItemComponent.originalElement

◆ removeOnCombined

bool Barotrauma.Items.Components.ItemComponent.removeOnCombined
protected

◆ ReplacedBy

ItemComponent Barotrauma.Items.Components.ItemComponent.ReplacedBy

◆ requiredItems

Dictionary<RelatedItem.RelationType, List<RelatedItem> > Barotrauma.Items.Components.ItemComponent.requiredItems

◆ requiredSkills

List<Skill> Barotrauma.Items.Components.ItemComponent.requiredSkills

◆ statusEffectLists

readonly Dictionary<ActionType, List<StatusEffect> > Barotrauma.Items.Components.ItemComponent.statusEffectLists

◆ WasUsed

bool Barotrauma.Items.Components.ItemComponent.WasUsed

Property Documentation

◆ AllowInGameEditing

bool Barotrauma.Items.Components.ItemComponent.AllowInGameEditing
getset

◆ AllowUIOverlap

bool Barotrauma.Items.Components.ItemComponent.AllowUIOverlap
getset

◆ AlternativeLayout

GUILayoutSettings Barotrauma.Items.Components.ItemComponent.AlternativeLayout
getprotected set

◆ CanBeCombined

bool Barotrauma.Items.Components.ItemComponent.CanBeCombined
getset

◆ CanBePicked

bool Barotrauma.Items.Components.ItemComponent.CanBePicked
getset

◆ CanBeSelected

bool Barotrauma.Items.Components.ItemComponent.CanBeSelected
getset

◆ CharacterUsable

bool Barotrauma.Items.Components.ItemComponent.CharacterUsable
getset

◆ CombatPriority

float Barotrauma.Items.Components.ItemComponent.CombatPriority
get

◆ DefaultLayout

GUILayoutSettings Barotrauma.Items.Components.ItemComponent.DefaultLayout
getprotected set

◆ DeleteOnUse

bool Barotrauma.Items.Components.ItemComponent.DeleteOnUse
getset

◆ DisallowSellingItemsFromContainer

virtual bool Barotrauma.Items.Components.ItemComponent.DisallowSellingItemsFromContainer
get

If enabled, the items inside any of the item containers on this item cannot be sold at an outpost. Use in similar cases as DontTransferInventoryBetweenSubs.

Definition at line 93 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ DisplayMsg

LocalizedString Barotrauma.Items.Components.ItemComponent.DisplayMsg
getset

◆ DontTransferInventoryBetweenSubs

virtual bool Barotrauma.Items.Components.ItemComponent.DontTransferInventoryBetweenSubs
get

If enabled, the contents of the item are not transferred when the player transfers items between subs. Use this if this component uses item containers in a way where removing the item from the container via external means would cause problems.

Definition at line 87 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ Drawable

bool Barotrauma.Items.Components.ItemComponent.Drawable
getset

◆ DrawHudWhenEquipped

bool Barotrauma.Items.Components.ItemComponent.DrawHudWhenEquipped
getprotected set

◆ GuiFrame

GUIFrame Barotrauma.Items.Components.ItemComponent.GuiFrame
getset

◆ GuiFrameOffset

Point Barotrauma.Items.Components.ItemComponent.GuiFrameOffset
getset

◆ HasSounds

bool Barotrauma.Items.Components.ItemComponent.HasSounds
get

◆ HasSoundsOfType

bool [] Barotrauma.Items.Components.ItemComponent.HasSoundsOfType
get

◆ HudLayer

int Barotrauma.Items.Components.ItemComponent.HudLayer
get

◆ HudPriority

int Barotrauma.Items.Components.ItemComponent.HudPriority
get

◆ InheritParentIsActive

bool Barotrauma.Items.Components.ItemComponent.InheritParentIsActive
getset

◆ IsActive

virtual bool? Barotrauma.Items.Components.ItemComponent.IsActive
getset

◆ IsActiveConditionalComparison

PropertyConditional.LogicalOperatorType Barotrauma.Items.Components.ItemComponent.IsActiveConditionalComparison
getset

◆ Item

Item Barotrauma.Items.Components.ItemComponent.Item
get

◆ LinkUIToComponent

string Barotrauma.Items.Components.ItemComponent.LinkUIToComponent
getset

◆ LockGuiFramePosition

bool Barotrauma.Items.Components.ItemComponent.LockGuiFramePosition
getset

◆ ManuallySelectedSound

int Barotrauma.Items.Components.ItemComponent.ManuallySelectedSound
get

Which sound should be played when manual sound selection type is selected? Not [Editable] because we don't want this visible in the editor for every component.

Definition at line 273 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ Msg

string Barotrauma.Items.Components.ItemComponent.Msg
getset

◆ Name

string Barotrauma.Items.Components.ItemComponent.Name
get

◆ Parent

ItemComponent Barotrauma.Items.Components.ItemComponent.Parent
getset

◆ PickingMsg

string Barotrauma.Items.Components.ItemComponent.PickingMsg
getset

◆ PickingTime

float Barotrauma.Items.Components.ItemComponent.PickingTime
getset

◆ PickKey

InputType Barotrauma.Items.Components.ItemComponent.PickKey
getprotected set

◆ RecreateGUIOnResolutionChange

virtual bool Barotrauma.Items.Components.ItemComponent.RecreateGUIOnResolutionChange
get

◆ RemoveOnCombined

bool Barotrauma.Items.Components.ItemComponent.RemoveOnCombined
getset

◆ SelectKey

InputType Barotrauma.Items.Components.ItemComponent.SelectKey
getprotected set

◆ SerializableProperties

Dictionary<Identifier, SerializableProperty> Barotrauma.Items.Components.ItemComponent.SerializableProperties
getprotected set

◆ Speed

float Barotrauma.Items.Components.ItemComponent.Speed
get

Can be used by status effects or conditionals to the speed of the item

Definition at line 278 of file BarotraumaShared/SharedSource/Items/Components/ItemComponent.cs.

◆ UpdateWhenInactive

virtual bool Barotrauma.Items.Components.ItemComponent.UpdateWhenInactive
get

◆ UseAlternativeLayout

bool?? Barotrauma.Items.Components.ItemComponent.UseAlternativeLayout
getset