Barotrauma Server Doc
Barotrauma.Item Class Reference
Inheritance diagram for Barotrauma.Item:
Barotrauma.Networking.IClientSerializable Barotrauma.Networking.IServerSerializable Barotrauma.ISerializableEntity Barotrauma.IDamageable Barotrauma.MapEntity Barotrauma.Networking.IClientSerializable Barotrauma.Networking.IServerPositionSync Barotrauma.ISerializableEntity Barotrauma.IIgnorable Barotrauma.IDamageable Barotrauma.MapEntity

Classes

struct  ApplyStatusEffectEventData
 
struct  ChangePropertyEventData
 
struct  ComponentStateEventData
 
interface  IEventData
 
struct  InventoryStateEventData
 
struct  SetItemStatEventData
 

Public Types

enum class  EventType {
  ComponentState = 0 , InventoryState = 1 , Treatment = 2 , ChangeProperty = 3 ,
  Combine = 4 , Status = 5 , AssignCampaignInteraction = 6 , ApplyStatusEffect = 7 ,
  Upgrade = 8 , ItemStat = 9 , DroppedStack = 10 , SetHighlight = 11 ,
  MinValue = 0 , MaxValue = 11
}
 

Public Member Functions

void AssignCampaignInteractionType (CampaignMode.InteractionType interactionType, IEnumerable< Client > targetClients=null)
 
void ResetWaterDragCoefficient ()
 Removes the override value -> falls back to using the original value defined in the xml. More...
 
bool IsInteractable (Character character)
 Returns interactibility based on whether the character is on a player team More...
 
override string ToString ()
 
bool IgnoreByAI (Character character)
 
 Item (ItemPrefab itemPrefab, Vector2 position, Submarine submarine, ushort id=Entity.NullEntityID, bool callOnItemLoaded=true)
 
 Item (Rectangle newRect, ItemPrefab itemPrefab, Submarine submarine, bool callOnItemLoaded=true, ushort id=Entity.NullEntityID)
 Creates a new item More...
 
bool IsContainerPreferred (ItemContainer container, out bool isPreferencesDefined, out bool isSecondary, bool requireConditionRestriction=false)
 
override MapEntity Clone ()
 
void AddComponent (ItemComponent component)
 
void EnableDrawableComponent (IDrawableComponent drawable)
 
void DisableDrawableComponent (IDrawableComponent drawable)
 
int GetComponentIndex (ItemComponent component)
 
GetComponent< T > ()
 
IEnumerable< T > GetComponents< T > ()
 
float GetQualityModifier (Quality.StatType statType)
 
void RemoveContained (Item contained)
 
void SetTransform (Vector2 simPosition, float rotation, bool findNewHull=true, bool setPrevTransform=true)
 
bool AllowDroppingOnSwapWith (Item otherItem)
 Is dropping the item allowed when trying to swap it with the other item More...
 
void SetActiveSprite ()
 
void CheckCleanable ()
 Recheck if the item needs to be included in the list of cleanable items More...
 
override void Move (Vector2 amount, bool ignoreContacts=true)
 
Rectangle TransformTrigger (Rectangle trigger, bool world=false)
 
override Quad2D GetTransformedQuad ()
 
Hull FindHull ()
 
bool HasAccess (Character character)
 Used by the AI to check whether they can (in principle) and are allowed (in practice) to interact with an object or not. Unlike CanInteractWith(), this method doesn't check the distance, the triggers, or anything like that. More...
 
bool IsOwnedBy (Entity entity)
 
Entity GetRootInventoryOwner ()
 
Inventory FindParentInventory (Func< Inventory, bool > predicate)
 
void SetContainedItemPositions ()
 
void AddTag (string tag)
 
void AddTag (Identifier tag)
 
bool HasTag (Identifier tag)
 
bool HasIdentifierOrTags (IEnumerable< Identifier > identifiersOrTags)
 
void ReplaceTag (string tag, string newTag)
 
void ReplaceTag (Identifier tag, Identifier newTag)
 
IReadOnlyCollection< IdentifierGetTags ()
 
bool HasTag (IEnumerable< Identifier > allowedTags)
 
bool ConditionalMatches (PropertyConditional conditional)
 
void ApplyStatusEffects (ActionType type, float deltaTime, Character character=null, Limb limb=null, Entity useTarget=null, bool isNetworkEvent=false, Vector2? worldPosition=null)
 
void ApplyStatusEffect (StatusEffect effect, ActionType type, float deltaTime, Character character=null, Limb limb=null, Entity useTarget=null, bool isNetworkEvent=false, bool checkCondition=true, Vector2? worldPosition=null)
 
AttackResult AddDamage (Character attacker, Vector2 worldPosition, Attack attack, Vector2 impulseDirection, float deltaTime, bool playSound=true)
 
void RecalculateConditionValues ()
 Recalculates the item's maximum condition, condition percentage and whether it's in full condition. You generally never need to call this manually - done automatically when any of the factors that affect the values change. More...
 
void SendPendingNetworkUpdates ()
 
void CreateStatusEvent (bool loadingRound)
 
override void Update (float deltaTime, Camera cam)
 
void UpdateTransform ()
 
override void FlipX (bool relativeToSub)
 Flip the entity horizontally More...
 
override void FlipY (bool relativeToSub)
 Flip the entity vertically More...
 
List< T > GetConnectedComponents< T > (bool recursive=false, bool allowTraversingBackwards=true, Func< Connection, bool > connectionFilter=null)
 Note: This function generates garbage and might be a bit too heavy to be used once per frame. More...
 
List< T > GetConnectedComponentsRecursive< T > (Connection c, bool ignoreInactiveRelays=false, bool allowTraversingBackwards=true)
 Note: This function generates garbage and might be a bit too heavy to be used once per frame. More...
 
Controller FindController (ImmutableArray< Identifier >? tags=null)
 
bool TryFindController (out Controller controller, ImmutableArray< Identifier >? tags=null)
 
void SendSignal (string signal, string connectionName)
 
void SendSignal (Signal signal, string connectionName)
 
void SendSignal (Signal signal, Connection connection)
 
bool IsInsideTrigger (Vector2 worldPosition)
 
bool IsInsideTrigger (Vector2 worldPosition, out Rectangle transformedTrigger)
 
bool CanClientAccess (Client c)
 
bool TryInteract (Character user, bool ignoreRequiredItems=false, bool forceSelectKey=false, bool forceUseKey=false)
 
float GetContainedItemConditionPercentage ()
 
void Use (float deltaTime, Character user=null, Limb targetLimb=null, Entity useTarget=null, Character userForOnUsedEvent=null)
 
void SecondaryUse (float deltaTime, Character character=null)
 
void ApplyTreatment (Character user, Character character, Limb targetLimb)
 
bool Combine (Item item, Character user)
 
void Drop (Character dropper, bool createNetworkEvent=true, bool setTransform=true)
 
void CreateDroppedStack (IEnumerable< Item > items, bool allowClientExecute)
 "Merges" the set of items so they behave as one physical object and can be picked up by clicking once. The items need to be instances of the same prefab and have a physics body. More...
 
void Equip (Character character)
 
void Unequip (Character character)
 
List<(object obj, SerializableProperty property)> GetProperties< T > ()
 
override XElement Save (XElement parentElement)
 
virtual void Reset ()
 
override void OnMapLoaded ()
 
override void ShallowRemove ()
 Remove the item 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...
 
override void Remove ()
 
object GetComponentString (string component)
 
void ServerEventWrite (IWriteMessage msg, Client c, NetEntityEvent.IData extraData=null)
 
void ServerEventRead (IReadMessage msg, Client c)
 
void WriteSpawnData (IWriteMessage msg, UInt16 entityID, UInt16 originalInventoryID, byte originalItemContainerIndex, int originalSlotIndex)
 
float GetPositionUpdateInterval (Client recipient)
 
void ServerWritePosition (ReadWriteMessage tempBuffer, Client c)
 
void CreateServerEvent< T > (T ic)
 
void CreateServerEvent< T > (T ic, ItemComponent.IEventData extraData)
 
object CreateServerEventString (string component)
 
object CreateServerEventString (string component, object[] extraData)
 
- Public Member Functions inherited from Barotrauma.MapEntity
void AddLinked (MapEntity entity)
 
 MapEntity (MapEntityPrefab prefab, Submarine submarine, ushort id)
 
void ResolveLinks (IdRemap childRemap)
 
virtual bool IsMouseOn (Vector2 position)
 
bool HasUpgrade (Identifier identifier)
 
Upgrade GetUpgrade (Identifier identifier)
 
List< Upgrade > GetUpgrades ()
 
void SetUpgrade (Upgrade upgrade, bool createNetworkEvent=false)
 
virtual bool AddUpgrade (Upgrade upgrade, bool createNetworkEvent=false)
 Adds a new upgrade to the item More...
 
override void Remove ()
 
void RemoveLinked (MapEntity e)
 
HashSet< T > GetLinkedEntities< T > (HashSet< T > list=null, int? maxDepth=null, Func< T, bool > filter=null)
 Gets all linked entities of specific type. More...
 
- 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 void UpdateHulls ()
 goes through every item and re-checks which hull they are in More...
 
static void UpdatePendingConditionUpdates (float deltaTime)
 
static Item Load (ContentXElement element, Submarine submarine, IdRemap idRemap)
 
static Item Load (ContentXElement element, Submarine submarine, bool createNetworkEvent, IdRemap idRemap)
 Instantiate a new item and load its data from the XML element. More...
 
static void RemoveByPrefab (ItemPrefab prefab)
 
- Static Public Member Functions inherited from Barotrauma.MapEntity
static void ClearHighlightedEntities ()
 
static List< MapEntityClone (List< MapEntity > entitiesToClone)
 
static void UpdateAll (float deltaTime, Camera cam)
 Call Update() on every object in Entity.list More...
 
static List< MapEntityLoadAll (Submarine submarine, XElement parentElement, string filePath, int idOffset)
 
static void MapLoaded (List< MapEntity > entities, bool updateHulls)
 
static void InitializeLoadedLinks (IEnumerable< MapEntity > entities)
 
- 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

bool Visible = true
 
PhysicsBody body
 
readonly XElement StaticBodyConfig
 
List< Fixture > StaticFixtures = new List<Fixture>()
 
Action OnInteract
 
ColorHighlightColor
 
bool StolenDuringRound
 
bool IsSalvageMissionItem
 
readonly ImmutableArray< ItemInventoryOwnInventories = ImmutableArray<ItemInventory>.Empty
 
readonly HashSet< ItemPrefabAvailableSwaps = new HashSet<ItemPrefab>()
 
Action< CharacterOnDeselect
 
Inventory PreviousParentInventory
 
- Public Attributes inherited from Barotrauma.MapEntity
readonly MapEntityPrefab Prefab
 
List< ushort > unresolvedLinkedToID
 
readonly HashSet< IdentifierDisallowedUpgradeSet = new HashSet<Identifier>()
 
readonly List< MapEntitylinkedTo = new List<MapEntity>()
 
bool ShouldBeSaved = true
 
int OriginalModuleIndex = -1
 The index of the outpost module this entity originally spawned in (-1 if not an outpost item) More...
 
int OriginalContainerIndex = -1
 
- 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< ItemItemList = new List<Item>()
 
static bool ShowLinks = true
 
static readonly ImmutableArray<(Identifier Input, Identifier Output)> connectionPairs
 
- Static Public Attributes inherited from Barotrauma.MapEntity
static readonly List< MapEntityMapEntityList = new List<MapEntity>()
 
static int MapEntityUpdateInterval = 1
 
static int PoweredUpdateInterval = 1
 
- 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 Attributes

Color spriteColor
 
- Protected Attributes inherited from Barotrauma.MapEntity
List< ushort > linkedToID
 
readonly List< Upgrade > Upgrades = new List<Upgrade>()
 List of upgrades this item has More...
 
bool flippedX
 
Rectangle rect
 
- Protected Attributes inherited from Barotrauma.Entity
AITarget aiTarget
 

Properties

static IReadOnlyCollection< ItemDangerousItems [get]
 
static IReadOnlyCollection< ItemRepairableItems [get]
 Items that have one more more Repairable component More...
 
static IReadOnlyCollection< ItemCleanableItems [get]
 Items that may potentially need to be cleaned up (pickable, not attached to a wall, and not inside a valid container) More...
 
static IReadOnlyCollection< ItemSonarVisibleItems [get]
 Items whose ItemPrefab.SonarSize is larger than 0 More...
 
new ItemPrefab Prefab [get]
 
Hull CurrentHull [get, set]
 
float??? HullOxygenPercentage [get]
 
CampaignMode.InteractionType CampaignInteractionType [get]
 
bool FullyInitialized [get]
 Has everything in the item been loaded/instantiated/initialized (basically, can be used to check if the whole constructor/Load method has run). Most commonly used to avoid creating network events when some value changes if the item is being initialized. More...
 
float?? WaterDragCoefficient [get, set]
 
BodyType??? BodyType [get, set]
 Can be used by StatusEffects to set the type of the body (if the item has one) More...
 
Rectangle DefaultRect [get, set]
 Unscaled rect More...
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get, protected set]
 
bool EditableWhenEquipped = false [get, set]
 
Inventory ParentInventory [get, set]
 
Item RootContainer [get]
 
Item Container [get]
 
override string Name [get]
 
string?? Description [get, set]
 
string? DescriptionTag [get, set]
 Can be used to set a localized description via StatusEffects More...
 
bool NonInteractable [get, set]
 
bool NonPlayerTeamInteractable [get, set]
 Use IsPlayerInteractable to also check NonInteractable More...
 
bool AllowSwapping [get, set]
 
bool PurchasedNewSwap [get, set]
 
bool IsPlayerTeamInteractable [get]
 Checks both NonInteractable and NonPlayerTeamInteractable More...
 
float RotationRad [get]
 
float Rotation [get, set]
 
float ImpactTolerance [get]
 
float InteractDistance [get]
 
float InteractPriority [get]
 
override Vector2? Position [get]
 
override Vector2? SimPosition [get]
 
Rectangle InteractionRect [get]
 
override float?? Scale [get, set]
 
float PositionUpdateInterval = float.PositiveInfinity [get, set]
 
Color SpriteColor [get, set]
 
Color InventoryIconColor [get, protected set]
 
Color ContainerColor [get, protected set]
 
Identifier??????? ContainerIdentifier [get]
 Can be used by status effects or conditionals to check what item this item is contained inside More...
 
bool IsContained [get]
 Can be used by status effects or conditionals to check whether the item is contained inside something More...
 
float? Speed [get]
 Can be used by status effects or conditionals to the speed of the item More...
 
string????? SonarLabel [get, set]
 Can be used to modify the AITarget's label using status effects More...
 
bool PhysicsBodyActive [get]
 Can be used by status effects or conditionals to check if the physics body of the item is active More...
 
new float? SoundRange [get, set]
 Can be used by status effects or conditionals to modify the sound range More...
 
new float? SightRange [get, set]
 Can be used by status effects or conditionals to modify the sight range More...
 
bool IsShootable [get, set]
 Should the item's Use method be called with the "Use" or with the "Shoot" key? More...
 
bool RequireAimToUse [get, set]
 If true, the user has to hold the "aim" key before use is registered. False by default. More...
 
bool RequireAimToSecondaryUse [get, set]
 If true, the user has to hold the "aim" key before secondary use is registered. True by default. More...
 
Color Color [get]
 
bool IsFullCondition [get]
 
float MaxCondition [get]
 
float ConditionPercentage [get]
 
float OffsetOnSelectedMultiplier [get, set]
 
float HealthMultiplier [get, set]
 
float MaxRepairConditionMultiplier [get, set]
 
float Condition [get, set]
 
bool ConditionIncreasedRecently [get]
 Return true if the condition of this item increased within the last second. More...
 
float Health [get]
 
bool?? Indestructible [get, set]
 Per-instance value - if not set, the value of the prefab is used. More...
 
bool AllowDeconstruct [get, set]
 
bool InvulnerableToDamage [get, set]
 
bool?? SpawnedInCurrentOutpost [get, set]
 
bool AllowStealing [get, set]
 
string???? OriginalOutpost [get, set]
 
string Tags [get, set]
 
bool FireProof [get]
 
bool WaterProof [get]
 
bool UseInHealthInterface [get]
 
int??? Quality [get, set]
 
bool InWater [get]
 
List< ConnectionLastSentSignalRecipients = new List<Connection>(20) [get]
 A list of connections the last signal sent by this item went through More...
 
ContentPath ConfigFilePath [get]
 
IEnumerable< InvSlotTypeAllowedSlots [get]
 
List< ConnectionConnections [get]
 
IEnumerable< ItemContainedItems [get]
 
ItemInventory OwnInventory [get]
 
bool DisplaySideBySideWhenLinked [get, set]
 
List< RepairableRepairables [get]
 
List< ItemComponentComponents [get]
 
override bool Linkable [get]
 
float WorldPositionX [get]
 
float WorldPositionY [get]
 
float PositionX [get]
 Can be used to move the item from XML (e.g. to correct the positions of items whose sprite origin has been changed) More...
 
float PositionY [get]
 Can be used to move the item from XML (e.g. to correct the positions of items whose sprite origin has been changed) More...
 
BallastFloraBranch Infector [get, set]
 
ItemPrefab PendingItemSwap [get, set]
 
IReadOnlyList< ISerializableEntityAllPropertyObjects [get]
 
bool OrderedToBeIgnored [get, set]
 
bool? HasBallastFloraInHull [get]
 
bool? IsClaimedByBallastFlora [get]
 
bool InPlayerSubmarine [get]
 
bool InBeaconStation [get]
 
bool IsLadder [get]
 
bool IsSecondaryItem [get]
 
ItemStatManager StatManager [get]
 
float LastEatenTime [get, set]
 Timing.TotalTimeUnpaused when some character was last eating the item More...
 
IEnumerable< ItemDroppedStack [get]
 
override SpriteSprite [get]
 
- Properties inherited from Barotrauma.MapEntity
string DisallowedUpgrades [get, set]
 
bool FlippedX [get]
 
bool FlippedY [get]
 
static IEnumerable< MapEntityHighlightedEntities [get]
 
bool ExternalHighlight [get, set]
 
bool IsHighlighted [get, set]
 
virtual Rectangle Rect [get, set]
 
Rectangle? WorldRect [get]
 
virtual Sprite Sprite [get]
 
virtual bool DrawBelowWater [get]
 
virtual bool DrawOverWater [get]
 
virtual bool Linkable [get]
 
IEnumerable< IdentifierAllowedLinks [get]
 
bool ResizeHorizontal [get]
 
bool ResizeVertical [get]
 
int RectWidth [get, set]
 
int RectHeight [get, set]
 
bool SpriteDepthOverrideIsSet [get]
 
float SpriteOverrideDepth [get]
 
float? SpriteDepth [get, set]
 
virtual float Scale = 1 [get, set]
 
bool HiddenInGame [get, set]
 
override Vector2 Position [get]
 
override Vector2 SimPosition [get]
 
float SoundRange [get, set]
 
float SightRange [get, set]
 
bool RemoveIfLinkedOutpostDoorInUse = true [get, protected set]
 
string Layer [get, set]
 
virtual string Name [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.IIgnorable
bool OrderedToBeIgnored [get, set]
 
- Properties inherited from Barotrauma.ISerializableEntity
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 

Additional Inherited Members

- Protected Member Functions inherited from Barotrauma.MapEntity
void ParseLinks (XElement element, IdRemap idRemap)
 
virtual void CheckIsHighlighted ()
 
void InsertToList ()
 
- Protected Member Functions inherited from Barotrauma.Entity
virtual ushort DetermineID (ushort id, Submarine submarine)
 
- Static Protected Attributes inherited from Barotrauma.MapEntity
static readonly HashSet< MapEntityhighlightedEntities = new HashSet<MapEntity>()
 

Detailed Description

Definition at line 25 of file BarotraumaShared/SharedSource/Items/Item.cs.

Member Enumeration Documentation

◆ EventType

Enumerator
ComponentState 
InventoryState 
Treatment 
ChangeProperty 
Combine 
Status 
AssignCampaignInteraction 
ApplyStatusEffect 
Upgrade 
ItemStat 
DroppedStack 
SetHighlight 
MinValue 
MaxValue 

Definition at line 13 of file BarotraumaShared/SharedSource/Items/ItemEventData.cs.

Constructor & Destructor Documentation

◆ Item() [1/2]

Barotrauma.Item.Item ( ItemPrefab  itemPrefab,
Vector2  position,
Submarine  submarine,
ushort  id = Entity.NullEntityID,
bool  callOnItemLoaded = true 
)

◆ Item() [2/2]

Barotrauma.Item.Item ( Rectangle  newRect,
ItemPrefab  itemPrefab,
Submarine  submarine,
bool  callOnItemLoaded = true,
ushort  id = Entity.NullEntityID 
)

Creates a new item

Parameters
callOnItemLoadedShould the OnItemLoaded methods of the ItemComponents be called. Use false if the item needs additional initialization before it can be considered fully loaded (e.g. when loading an item from a sub file or cloning an item).

Definition at line 1031 of file BarotraumaShared/SharedSource/Items/Item.cs.

Member Function Documentation

◆ AddComponent()

void Barotrauma.Item.AddComponent ( ItemComponent  component)

◆ AddDamage()

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

◆ AddTag() [1/2]

void Barotrauma.Item.AddTag ( Identifier  tag)

◆ AddTag() [2/2]

void Barotrauma.Item.AddTag ( string  tag)

◆ AllowDroppingOnSwapWith()

bool Barotrauma.Item.AllowDroppingOnSwapWith ( Item  otherItem)

Is dropping the item allowed when trying to swap it with the other item

Definition at line 1551 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ApplyStatusEffect()

void Barotrauma.Item.ApplyStatusEffect ( StatusEffect  effect,
ActionType  type,
float  deltaTime,
Character  character = null,
Limb  limb = null,
Entity  useTarget = null,
bool  isNetworkEvent = false,
bool  checkCondition = true,
Vector2?  worldPosition = null 
)

◆ ApplyStatusEffects()

void Barotrauma.Item.ApplyStatusEffects ( ActionType  type,
float  deltaTime,
Character  character = null,
Limb  limb = null,
Entity  useTarget = null,
bool  isNetworkEvent = false,
Vector2?  worldPosition = null 
)

◆ ApplyTreatment()

void Barotrauma.Item.ApplyTreatment ( Character  user,
Character  character,
Limb  targetLimb 
)

◆ AssignCampaignInteractionType()

void Barotrauma.Item.AssignCampaignInteractionType ( CampaignMode.InteractionType  interactionType,
IEnumerable< Client targetClients = null 
)

Definition at line 83 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ CanClientAccess()

bool Barotrauma.Item.CanClientAccess ( Client  c)

◆ CheckCleanable()

void Barotrauma.Item.CheckCleanable ( )

Recheck if the item needs to be included in the list of cleanable items

Definition at line 1579 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Clone()

override MapEntity Barotrauma.Item.Clone ( )
virtual

◆ Combine()

bool Barotrauma.Item.Combine ( Item  item,
Character  user 
)

◆ ConditionalMatches()

bool Barotrauma.Item.ConditionalMatches ( PropertyConditional  conditional)

◆ CreateDroppedStack()

void Barotrauma.Item.CreateDroppedStack ( IEnumerable< Item items,
bool  allowClientExecute 
)

"Merges" the set of items so they behave as one physical object and can be picked up by clicking once. The items need to be instances of the same prefab and have a physics body.

Definition at line 3282 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ CreateServerEvent< T >() [1/2]

void Barotrauma.Item.CreateServerEvent< T > ( ic)
Type Constraints
T :ItemComponent 
T :IServerSerializable 
T :CreateServerEvent 
T :ic 
T :ic.ServerGetEventData() 

◆ CreateServerEvent< T >() [2/2]

void Barotrauma.Item.CreateServerEvent< T > ( ic,
ItemComponent.IEventData  extraData 
)
Type Constraints
T :ItemComponent 
T :IServerSerializable 

Definition at line 407 of file BarotraumaServer/ServerSource/Items/Item.cs.

◆ CreateServerEventString() [1/2]

object Barotrauma.Item.CreateServerEventString ( string  component)

◆ CreateServerEventString() [2/2]

object Barotrauma.Item.CreateServerEventString ( string  component,
object[]  extraData 
)

◆ CreateStatusEvent()

void Barotrauma.Item.CreateStatusEvent ( bool  loadingRound)

◆ DisableDrawableComponent()

void Barotrauma.Item.DisableDrawableComponent ( IDrawableComponent  drawable)

◆ Drop()

void Barotrauma.Item.Drop ( Character  dropper,
bool  createNetworkEvent = true,
bool  setTransform = true 
)

Parameters
dropperCharacter who dropped the item
createNetworkEventShould clients be notified of the item being dropped
setTransformShould the transform of the physics body be updated. Only disable this if you're moving the item somewhere else / calling SetTransform manually immediately after dropping!

Definition at line 3214 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ EnableDrawableComponent()

void Barotrauma.Item.EnableDrawableComponent ( IDrawableComponent  drawable)

◆ Equip()

void Barotrauma.Item.Equip ( Character  character)

◆ FindController()

Controller Barotrauma.Item.FindController ( ImmutableArray< Identifier >?  tags = null)

◆ FindHull()

Hull Barotrauma.Item.FindHull ( )

◆ FindParentInventory()

Inventory Barotrauma.Item.FindParentInventory ( Func< Inventory, bool >  predicate)

◆ FlipX()

override void Barotrauma.Item.FlipX ( bool  relativeToSub)
virtual

Flip the entity horizontally

Parameters
relativeToSubShould the entity be flipped across the y-axis of the sub it's inside

Reimplemented from Barotrauma.MapEntity.

Definition at line 2515 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ FlipY()

override void Barotrauma.Item.FlipY ( bool  relativeToSub)
virtual

Flip the entity vertically

Parameters
relativeToSubShould the entity be flipped across the x-axis of the sub it's inside

Reimplemented from Barotrauma.MapEntity.

Definition at line 2544 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ GetComponent< T >()

T Barotrauma.Item.GetComponent< T > ( )
Type Constraints
T :ItemComponent 

Definition at line 1467 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ GetComponentIndex()

int Barotrauma.Item.GetComponentIndex ( ItemComponent  component)

◆ GetComponents< T >()

IEnumerable<T> Barotrauma.Item.GetComponents< T > ( )

◆ GetComponentString()

object Barotrauma.Item.GetComponentString ( string  component)

◆ GetConnectedComponents< T >()

List<T> Barotrauma.Item.GetConnectedComponents< T > ( bool  recursive = false,
bool  allowTraversingBackwards = true,
Func< Connection, bool >  connectionFilter = null 
)

Note: This function generates garbage and might be a bit too heavy to be used once per frame.

Type Constraints
T :ItemComponent 

Definition at line 2576 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ GetConnectedComponentsRecursive< T >()

List<T> Barotrauma.Item.GetConnectedComponentsRecursive< T > ( Connection  c,
bool  ignoreInactiveRelays = false,
bool  allowTraversingBackwards = true 
)

Note: This function generates garbage and might be a bit too heavy to be used once per frame.

Type Constraints
T :ItemComponent 

Definition at line 2622 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ GetContainedItemConditionPercentage()

float Barotrauma.Item.GetContainedItemConditionPercentage ( )

◆ GetPositionUpdateInterval()

float Barotrauma.Item.GetPositionUpdateInterval ( Client  recipient)

Definition at line 365 of file BarotraumaServer/ServerSource/Items/Item.cs.

◆ GetProperties< T >()

List<(object obj, SerializableProperty property)> Barotrauma.Item.GetProperties< T > ( )

◆ GetQualityModifier()

float Barotrauma.Item.GetQualityModifier ( Quality.StatType  statType)

◆ GetRootInventoryOwner()

Entity Barotrauma.Item.GetRootInventoryOwner ( )

◆ GetTags()

IReadOnlyCollection<Identifier> Barotrauma.Item.GetTags ( )

◆ GetTransformedQuad()

override Quad2D Barotrauma.Item.GetTransformedQuad ( )
virtual

Reimplemented from Barotrauma.MapEntity.

◆ HasAccess()

bool Barotrauma.Item.HasAccess ( Character  character)

Used by the AI to check whether they can (in principle) and are allowed (in practice) to interact with an object or not. Unlike CanInteractWith(), this method doesn't check the distance, the triggers, or anything like that.

Definition at line 1743 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ HasIdentifierOrTags()

bool Barotrauma.Item.HasIdentifierOrTags ( IEnumerable< Identifier identifiersOrTags)

◆ HasTag() [1/2]

bool Barotrauma.Item.HasTag ( Identifier  tag)

◆ HasTag() [2/2]

bool Barotrauma.Item.HasTag ( IEnumerable< Identifier allowedTags)

◆ IgnoreByAI()

bool Barotrauma.Item.IgnoreByAI ( Character  character)

Implements Barotrauma.IIgnorable.

◆ IsContainerPreferred()

bool Barotrauma.Item.IsContainerPreferred ( ItemContainer  container,
out bool  isPreferencesDefined,
out bool  isSecondary,
bool  requireConditionRestriction = false 
)

◆ IsInsideTrigger() [1/2]

bool Barotrauma.Item.IsInsideTrigger ( Vector2  worldPosition)

◆ IsInsideTrigger() [2/2]

bool Barotrauma.Item.IsInsideTrigger ( Vector2  worldPosition,
out Rectangle  transformedTrigger 
)

◆ IsInteractable()

bool Barotrauma.Item.IsInteractable ( Character  character)

Returns interactibility based on whether the character is on a player team

Definition at line 366 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ IsOwnedBy()

bool Barotrauma.Item.IsOwnedBy ( Entity  entity)

◆ Load() [1/2]

static Item Barotrauma.Item.Load ( ContentXElement  element,
Submarine  submarine,
bool  createNetworkEvent,
IdRemap  idRemap 
)
static

Instantiate a new item and load its data from the XML element.

Parameters
elementThe element containing the data of the item
submarineThe submarine to spawn the item in (can be null)
createNetworkEventShould an EntitySpawner event be created to notify clients about the item being created.
Returns

Definition at line 3730 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Load() [2/2]

static Item Barotrauma.Item.Load ( ContentXElement  element,
Submarine  submarine,
IdRemap  idRemap 
)
static

◆ Move()

override void Barotrauma.Item.Move ( Vector2  amount,
bool  ignoreContacts = true 
)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 1597 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ OnMapLoaded()

override void Barotrauma.Item.OnMapLoaded ( )
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 4079 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ RecalculateConditionValues()

void Barotrauma.Item.RecalculateConditionValues ( )

Recalculates the item's maximum condition, condition percentage and whether it's in full condition. You generally never need to call this manually - done automatically when any of the factors that affect the values change.

Definition at line 2103 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Remove()

override void Barotrauma.Item.Remove ( )
virtual

Reimplemented from Barotrauma.Entity.

Definition at line 4112 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ RemoveByPrefab()

static void Barotrauma.Item.RemoveByPrefab ( ItemPrefab  prefab)
static

◆ RemoveContained()

void Barotrauma.Item.RemoveContained ( Item  contained)

◆ ReplaceTag() [1/2]

void Barotrauma.Item.ReplaceTag ( Identifier  tag,
Identifier  newTag 
)

◆ ReplaceTag() [2/2]

void Barotrauma.Item.ReplaceTag ( string  tag,
string  newTag 
)

◆ Reset()

virtual void Barotrauma.Item.Reset ( )
virtual

◆ ResetWaterDragCoefficient()

void Barotrauma.Item.ResetWaterDragCoefficient ( )

Removes the override value -> falls back to using the original value defined in the xml.

◆ Save()

override XElement Barotrauma.Item.Save ( XElement  parentElement)
virtual

Reimplemented from Barotrauma.MapEntity.

Definition at line 3990 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ SecondaryUse()

void Barotrauma.Item.SecondaryUse ( float  deltaTime,
Character  character = null 
)

◆ SendPendingNetworkUpdates()

void Barotrauma.Item.SendPendingNetworkUpdates ( )

◆ SendSignal() [1/3]

void Barotrauma.Item.SendSignal ( Signal  signal,
Connection  connection 
)

◆ SendSignal() [2/3]

void Barotrauma.Item.SendSignal ( Signal  signal,
string  connectionName 
)

◆ SendSignal() [3/3]

void Barotrauma.Item.SendSignal ( string  signal,
string  connectionName 
)

◆ ServerEventRead()

void Barotrauma.Item.ServerEventRead ( IReadMessage  msg,
Client  c 
)

◆ ServerEventWrite()

void Barotrauma.Item.ServerEventWrite ( IWriteMessage  msg,
Client  c,
NetEntityEvent.IData  extraData = null 
)

◆ ServerWritePosition()

void Barotrauma.Item.ServerWritePosition ( ReadWriteMessage  tempBuffer,
Client  c 
)

◆ SetActiveSprite()

void Barotrauma.Item.SetActiveSprite ( )

◆ SetContainedItemPositions()

void Barotrauma.Item.SetContainedItemPositions ( )

◆ SetTransform()

void Barotrauma.Item.SetTransform ( Vector2  simPosition,
float  rotation,
bool  findNewHull = true,
bool  setPrevTransform = true 
)

◆ ShallowRemove()

override void Barotrauma.Item.ShallowRemove ( )
virtual

Remove the item 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

Reimplemented from Barotrauma.MapEntity.

Definition at line 4093 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ToString()

override string Barotrauma.Item.ToString ( )

Definition at line 961 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ TransformTrigger()

Rectangle Barotrauma.Item.TransformTrigger ( Rectangle  trigger,
bool  world = false 
)

◆ TryFindController()

bool Barotrauma.Item.TryFindController ( out Controller  controller,
ImmutableArray< Identifier >?  tags = null 
)

◆ TryInteract()

bool Barotrauma.Item.TryInteract ( Character  user,
bool  ignoreRequiredItems = false,
bool  forceSelectKey = false,
bool  forceUseKey = false 
)

◆ Unequip()

void Barotrauma.Item.Unequip ( Character  character)

◆ Update()

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

Reimplemented from Barotrauma.MapEntity.

Definition at line 2162 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ UpdateHulls()

static void Barotrauma.Item.UpdateHulls ( )
static

goes through every item and re-checks which hull they are in

Definition at line 1655 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ UpdatePendingConditionUpdates()

static void Barotrauma.Item.UpdatePendingConditionUpdates ( float  deltaTime)
static

◆ UpdateTransform()

void Barotrauma.Item.UpdateTransform ( )

◆ Use()

void Barotrauma.Item.Use ( float  deltaTime,
Character  user = null,
Limb  targetLimb = null,
Entity  useTarget = null,
Character  userForOnUsedEvent = null 
)
Parameters
userForOnUsedEventUser to pass to the OnUsed event. May need to be different than the user in cases like loaders using ammo boxes: the box is technically being used by the loader, and doesn't allow a character to use it, but we may still need to know which character caused the box to be used.

Definition at line 3062 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ WriteSpawnData()

void Barotrauma.Item.WriteSpawnData ( IWriteMessage  msg,
UInt16  entityID,
UInt16  originalInventoryID,
byte  originalItemContainerIndex,
int  originalSlotIndex 
)

Definition at line 243 of file BarotraumaServer/ServerSource/Items/Item.cs.

Member Data Documentation

◆ AvailableSwaps

readonly HashSet<ItemPrefab> Barotrauma.Item.AvailableSwaps = new HashSet<ItemPrefab>()

Definition at line 959 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ body

PhysicsBody Barotrauma.Item.body

Definition at line 115 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ connectionPairs

readonly ImmutableArray<(Identifier Input, Identifier Output)> Barotrauma.Item.connectionPairs
static
Initial value:
= new (Identifier, Identifier)[]
{
("power_in".ToIdentifier(), "power_out".ToIdentifier()),
("signal_in1".ToIdentifier(), "signal_out1".ToIdentifier()),
("signal_in2".ToIdentifier(), "signal_out2".ToIdentifier()),
("signal_in3".ToIdentifier(), "signal_out3".ToIdentifier()),
("signal_in4".ToIdentifier(), "signal_out4".ToIdentifier()),
("signal_in".ToIdentifier(), "signal_out".ToIdentifier()),
("signal_in1".ToIdentifier(), "signal_out".ToIdentifier()),
("signal_in2".ToIdentifier(), "signal_out".ToIdentifier())
}.ToImmutableArray()

Definition at line 2631 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ HighlightColor

Color? Barotrauma.Item.HighlightColor

Definition at line 559 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ IsSalvageMissionItem

bool Barotrauma.Item.IsSalvageMissionItem

Definition at line 749 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ItemList

readonly List<Item> Barotrauma.Item.ItemList = new List<Item>()
static

Definition at line 27 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ OnDeselect

Action<Character> Barotrauma.Item.OnDeselect

◆ OnInteract

Action Barotrauma.Item.OnInteract

Definition at line 187 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ OwnInventories

readonly ImmutableArray<ItemInventory> Barotrauma.Item.OwnInventories = ImmutableArray<ItemInventory>.Empty

Definition at line 907 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ PreviousParentInventory

Inventory Barotrauma.Item.PreviousParentInventory

Definition at line 15 of file BarotraumaServer/ServerSource/Items/Item.cs.

◆ ShowLinks

bool Barotrauma.Item.ShowLinks = true
static

Definition at line 56 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ spriteColor

Color Barotrauma.Item.spriteColor
protected

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

◆ StaticBodyConfig

readonly XElement Barotrauma.Item.StaticBodyConfig

Definition at line 144 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ StaticFixtures

List<Fixture> Barotrauma.Item.StaticFixtures = new List<Fixture>()

Definition at line 146 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ StolenDuringRound

bool Barotrauma.Item.StolenDuringRound

Definition at line 724 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Visible

bool Barotrauma.Item.Visible = true

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

Property Documentation

◆ AllowDeconstruct

bool Barotrauma.Item.AllowDeconstruct
getset

Definition at line 715 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ AllowedSlots

IEnumerable<InvSlotType> Barotrauma.Item.AllowedSlots
get

Definition at line 858 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ AllowStealing

bool Barotrauma.Item.AllowStealing
getset

Definition at line 743 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ AllowSwapping

bool Barotrauma.Item.AllowSwapping
getset

Definition at line 339 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ AllPropertyObjects

IReadOnlyList<ISerializableEntity> Barotrauma.Item.AllPropertyObjects
get

Definition at line 967 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ BodyType

BodyType??? Barotrauma.Item.BodyType
getset

Can be used by StatusEffects to set the type of the body (if the item has one)

Definition at line 127 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ CampaignInteractionType

CampaignMode.InteractionType Barotrauma.Item.CampaignInteractionType
get

Definition at line 78 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ CleanableItems

IReadOnlyCollection<Item> Barotrauma.Item.CleanableItems
staticget

Items that may potentially need to be cleaned up (pickable, not attached to a wall, and not inside a valid container)

Definition at line 45 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Color

Color Barotrauma.Item.Color
get

Definition at line 634 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Components

List<ItemComponent> Barotrauma.Item.Components
get

Definition at line 919 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Condition

float Barotrauma.Item.Condition
getset

Definition at line 684 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ConditionIncreasedRecently

bool Barotrauma.Item.ConditionIncreasedRecently
get

Return true if the condition of this item increased within the last second.

Definition at line 698 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ConditionPercentage

float Barotrauma.Item.ConditionPercentage
get

Definition at line 641 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ConfigFilePath

ContentPath Barotrauma.Item.ConfigFilePath
get

Definition at line 854 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Connections

List<Connection> Barotrauma.Item.Connections
get

Definition at line 866 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ContainedItems

IEnumerable<Item> Barotrauma.Item.ContainedItems
get

Definition at line 876 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Container

Item Barotrauma.Item.Container
get

Definition at line 263 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ContainerColor

Color Barotrauma.Item.ContainerColor
getprotected set

Definition at line 505 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ContainerIdentifier

Identifier??????? Barotrauma.Item.ContainerIdentifier
get

Can be used by status effects or conditionals to check what item this item is contained inside

Definition at line 514 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ CurrentHull

Hull Barotrauma.Item.CurrentHull
getset

Definition at line 63 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ DangerousItems

IReadOnlyCollection<Item> Barotrauma.Item.DangerousItems
staticget

Definition at line 31 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ DefaultRect

Rectangle Barotrauma.Item.DefaultRect
getset

Unscaled rect

Definition at line 169 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Description

string?? Barotrauma.Item.Description
getset

Definition at line 284 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ DescriptionTag

string? Barotrauma.Item.DescriptionTag
getset

Can be used to set a localized description via StatusEffects

Definition at line 296 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ DisplaySideBySideWhenLinked

bool Barotrauma.Item.DisplaySideBySideWhenLinked
getset

Definition at line 912 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ DroppedStack

IEnumerable<Item> Barotrauma.Item.DroppedStack
get

◆ EditableWhenEquipped

bool Barotrauma.Item.EditableWhenEquipped = false
getset

Definition at line 221 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ FireProof

bool Barotrauma.Item.FireProof
get

Definition at line 791 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ FullyInitialized

bool Barotrauma.Item.FullyInitialized
get

Has everything in the item been loaded/instantiated/initialized (basically, can be used to check if the whole constructor/Load method has run). Most commonly used to avoid creating network events when some value changes if the item is being initialized.

Definition at line 113 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ HasBallastFloraInHull

bool? Barotrauma.Item.HasBallastFloraInHull
get

Definition at line 975 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Health

float Barotrauma.Item.Health
get

Definition at line 700 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ HealthMultiplier

float Barotrauma.Item.HealthMultiplier
getset

Definition at line 655 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ HullOxygenPercentage

float??? Barotrauma.Item.HullOxygenPercentage
get

Definition at line 72 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ImpactTolerance

float Barotrauma.Item.ImpactTolerance
get

Definition at line 415 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ InBeaconStation

bool Barotrauma.Item.InBeaconStation
get

Definition at line 993 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Indestructible

bool?? Barotrauma.Item.Indestructible
getset

Per-instance value - if not set, the value of the prefab is used.

Definition at line 709 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Infector

BallastFloraBranch Barotrauma.Item.Infector
getset

Definition at line 955 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ InPlayerSubmarine

bool Barotrauma.Item.InPlayerSubmarine
get

Definition at line 992 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ InteractDistance

float Barotrauma.Item.InteractDistance
get

Definition at line 420 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ InteractionRect

Rectangle Barotrauma.Item.InteractionRect
get

Definition at line 446 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ InteractPriority

float Barotrauma.Item.InteractPriority
get

Definition at line 425 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ InventoryIconColor

Color Barotrauma.Item.InventoryIconColor
getprotected set

Definition at line 497 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ InvulnerableToDamage

bool Barotrauma.Item.InvulnerableToDamage
getset

Definition at line 722 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ InWater

bool Barotrauma.Item.InWater
get

Definition at line 832 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ IsClaimedByBallastFlora

bool? Barotrauma.Item.IsClaimedByBallastFlora
get

Definition at line 983 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ IsContained

bool Barotrauma.Item.IsContained
get

Can be used by status effects or conditionals to check whether the item is contained inside something

Definition at line 528 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ IsFullCondition

bool Barotrauma.Item.IsFullCondition
get

Definition at line 639 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ IsLadder

bool Barotrauma.Item.IsLadder
get

Definition at line 995 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ IsPlayerTeamInteractable

bool Barotrauma.Item.IsPlayerTeamInteractable
get

◆ IsSecondaryItem

bool Barotrauma.Item.IsSecondaryItem
get

Definition at line 997 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ IsShootable

bool Barotrauma.Item.IsShootable
getset

Should the item's Use method be called with the "Use" or with the "Shoot" key?

Definition at line 614 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ LastEatenTime

float Barotrauma.Item.LastEatenTime
getset

Timing.TotalTimeUnpaused when some character was last eating the item

Definition at line 1012 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ LastSentSignalRecipients

List<Connection> Barotrauma.Item.LastSentSignalRecipients = new List<Connection>(20)
get

A list of connections the last signal sent by this item went through

Definition at line 848 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Linkable

override bool Barotrauma.Item.Linkable
get

Definition at line 924 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ MaxCondition

float Barotrauma.Item.MaxCondition
get

Definition at line 640 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ MaxRepairConditionMultiplier

float Barotrauma.Item.MaxRepairConditionMultiplier
getset

Definition at line 671 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Name

override string Barotrauma.Item.Name
get

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

◆ NonInteractable

bool Barotrauma.Item.NonInteractable
getset

Definition at line 322 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ NonPlayerTeamInteractable

bool Barotrauma.Item.NonPlayerTeamInteractable
getset

Use IsPlayerInteractable to also check NonInteractable

Definition at line 332 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ OffsetOnSelectedMultiplier

float Barotrauma.Item.OffsetOnSelectedMultiplier
getset

Definition at line 646 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ OrderedToBeIgnored

bool Barotrauma.Item.OrderedToBeIgnored
getset

Definition at line 973 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ OriginalOutpost

string???? Barotrauma.Item.OriginalOutpost
getset

Definition at line 753 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ OwnInventory

ItemInventory Barotrauma.Item.OwnInventory
get

Definition at line 902 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ ParentInventory

Inventory Barotrauma.Item.ParentInventory
getset

Definition at line 224 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ PendingItemSwap

ItemPrefab Barotrauma.Item.PendingItemSwap
getset

Definition at line 957 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ PhysicsBodyActive

bool Barotrauma.Item.PhysicsBodyActive
get

Can be used by status effects or conditionals to check if the physics body of the item is active

Definition at line 582 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Position

override Vector2? Barotrauma.Item.Position
get

Definition at line 430 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ PositionUpdateInterval

float Barotrauma.Item.PositionUpdateInterval = float.PositiveInfinity
getset

Definition at line 482 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ PositionX

float Barotrauma.Item.PositionX
get

Can be used to move the item from XML (e.g. to correct the positions of items whose sprite origin has been changed)

Definition at line 935 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ PositionY

float Barotrauma.Item.PositionY
get

Can be used to move the item from XML (e.g. to correct the positions of items whose sprite origin has been changed)

Definition at line 946 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Prefab

new ItemPrefab Barotrauma.Item.Prefab
get

Definition at line 54 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ PurchasedNewSwap

bool Barotrauma.Item.PurchasedNewSwap
getset

Definition at line 346 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Quality

int??? Barotrauma.Item.Quality
getset

Definition at line 817 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ RepairableItems

IReadOnlyCollection<Item> Barotrauma.Item.RepairableItems
staticget

Items that have one more more Repairable component

Definition at line 38 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Repairables

List<Repairable> Barotrauma.Item.Repairables
get

Definition at line 914 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ RequireAimToSecondaryUse

bool Barotrauma.Item.RequireAimToSecondaryUse
getset

If true, the user has to hold the "aim" key before secondary use is registered. True by default.

Definition at line 629 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ RequireAimToUse

bool Barotrauma.Item.RequireAimToUse
getset

If true, the user has to hold the "aim" key before use is registered. False by default.

Definition at line 620 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ RootContainer

Item Barotrauma.Item.RootContainer
get

Definition at line 245 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Rotation

float Barotrauma.Item.Rotation
getset

Definition at line 388 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ RotationRad

float Barotrauma.Item.RotationRad
get

Definition at line 385 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Scale

override float?? Barotrauma.Item.Scale
getset

Definition at line 455 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ SerializableProperties

Dictionary<Identifier, SerializableProperty> Barotrauma.Item.SerializableProperties
getprotected set

Definition at line 189 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ SightRange

new float? Barotrauma.Item.SightRange
getset

Can be used by status effects or conditionals to modify the sight range

Definition at line 604 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ SimPosition

override Vector2? Barotrauma.Item.SimPosition
get

Definition at line 438 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ SonarLabel

string????? Barotrauma.Item.SonarLabel
getset

Can be used to modify the AITarget's label using status effects

Definition at line 566 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ SonarVisibleItems

IReadOnlyCollection<Item> Barotrauma.Item.SonarVisibleItems
staticget

Items whose ItemPrefab.SonarSize is larger than 0

Definition at line 52 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ SoundRange

new float? Barotrauma.Item.SoundRange
getset

Can be used by status effects or conditionals to modify the sound range

Definition at line 594 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ SpawnedInCurrentOutpost

bool?? Barotrauma.Item.SpawnedInCurrentOutpost
getset

Definition at line 727 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Speed

float? Barotrauma.Item.Speed
get

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

Definition at line 539 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ Sprite

override Sprite? Barotrauma.Item.Sprite
get

Definition at line 17 of file BarotraumaServer/ServerSource/Items/Item.cs.

◆ SpriteColor

Color Barotrauma.Item.SpriteColor
getset

Definition at line 490 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ StatManager

ItemStatManager Barotrauma.Item.StatManager
get

◆ Tags

string Barotrauma.Item.Tags
getset

Definition at line 769 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ UseInHealthInterface

bool Barotrauma.Item.UseInHealthInterface
get

Definition at line 812 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ WaterDragCoefficient

float?? Barotrauma.Item.WaterDragCoefficient
getset

Definition at line 118 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ WaterProof

bool Barotrauma.Item.WaterProof
get

Definition at line 798 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ WorldPositionX

float Barotrauma.Item.WorldPositionX
get

Definition at line 929 of file BarotraumaShared/SharedSource/Items/Item.cs.

◆ WorldPositionY

float Barotrauma.Item.WorldPositionY
get

Definition at line 930 of file BarotraumaShared/SharedSource/Items/Item.cs.