Item

Barotrauma Item class with some additional functions and fields

Barotrauma source code: Item.cs

Functions

AddComponent(component)

AddComponent

Parameters

  • component Items.Components.ItemComponent

AddDamage(attacker, worldPosition, attack, impulseDirection, deltaTime, playSound)

AddDamage

Parameters

  • attacker Character

  • worldPosition Microsoft.Xna.Framework.Vector2

  • attack Attack

  • impulseDirection Microsoft.Xna.Framework.Vector2

  • deltaTime number

  • playSound bool

Returns

  • AttackResult

AddLinked(entity)

AddLinked

Parameters

  • entity MapEntity

AddTag(tag)

AddTag

Parameters

AddTag(tag)

AddTag

Parameters

  • tag Identifier

AddToGUIUpdateList(order)

AddToGUIUpdateList

Parameters

  • order number

AddUpgrade(upgrade, createNetworkEvent)

AddUpgrade

Parameters

  • upgrade Upgrade

  • createNetworkEvent bool

Returns

  • bool

AllowDroppingOnSwapWith(otherItem)

AllowDroppingOnSwapWith

Parameters

Returns

  • bool

ApplyStatusEffect(effect, type, deltaTime, character, limb, useTarget, isNetworkEvent, checkCondition, worldPosition)

ApplyStatusEffect

Parameters

  • effect StatusEffect

  • type ActionType

  • deltaTime number

  • character Character

  • limb Limb

  • useTarget Entity

  • isNetworkEvent bool

  • checkCondition bool

  • worldPosition optional Microsoft.Xna.Framework.Vector2

ApplyStatusEffects(type, deltaTime, character, limb, useTarget, isNetworkEvent, worldPosition)

ApplyStatusEffects

Parameters

  • type ActionType

  • deltaTime number

  • character Character

  • limb Limb

  • useTarget Entity

  • isNetworkEvent bool

  • worldPosition optional Microsoft.Xna.Framework.Vector2

ApplyTreatment(user, character, targetLimb)

ApplyTreatment

Parameters

  • user Character

  • character Character

  • targetLimb Limb

AssignCampaignInteractionType(interactionType, targetClients)

AssignCampaignInteractionType

Parameters

  • interactionType InteractionType

  • targetClients IEnumerable

CanClientAccess(c)

CanClientAccess

Parameters

  • c Networking.Client

Returns

  • bool

CheckCleanable()

CheckCleanable

CheckNeedsSoundUpdate(ic)

CheckNeedsSoundUpdate

Parameters

  • ic Items.Components.ItemComponent

ClientEventRead(msg, sendingTime)

ClientEventRead

Parameters

  • msg Networking.IReadMessage

  • sendingTime number

ClientEventWrite(msg, extraData)

ClientEventWrite

Parameters

  • msg Networking.IWriteMessage

  • extraData Networking.IData

ClientReadPosition(msg, sendingTime)

ClientReadPosition

Parameters

  • msg Networking.IReadMessage

  • sendingTime number

Clone()

Clone

Returns

  • MapEntity

Combine(item, user)

Combine

Parameters

  • user Character

Returns

  • bool

ConditionalMatches(conditional)

ConditionalMatches

Parameters

  • conditional PropertyConditional

Returns

  • bool

ConditionalMatches(conditional, checkContainer)

ConditionalMatches

Parameters

  • conditional PropertyConditional

  • checkContainer bool

Returns

  • bool

CreateClientEvent(ic)

CreateClientEvent

Parameters

  • ic T

CreateClientEvent(ic, extraData)

CreateClientEvent

Parameters

  • ic T

  • extraData Items.Components.IEventData

CreateContainerTagPicker(tagTextBox)

CreateContainerTagPicker

Parameters

  • tagTextBox GUITextBox

CreateDroppedStack(items, allowClientExecute)

CreateDroppedStack

Parameters

  • items IEnumerable

  • allowClientExecute bool

CreateEditingHUD(inGame)

CreateEditingHUD

Parameters

  • inGame bool

Returns

  • GUIComponent

CreateServerEvent(ic)

CreateServerEvent

Parameters

  • ic T

CreateServerEvent(ic, extraData)

CreateServerEvent

Parameters

  • ic T

  • extraData Items.Components.IEventData

CreateServerEventString(component)

CreateServerEventString

Parameters

Returns

  • Object

CreateServerEventString(component, extraData)

CreateServerEventString

Parameters

  • extraData Object[]

Returns

  • Object

CreateStatusEvent(loadingRound)

CreateStatusEvent

Parameters

  • loadingRound bool

DisableDrawableComponent(drawable)

DisableDrawableComponent

Parameters

  • drawable Items.Components.IDrawableComponent

Draw(spriteBatch, editing, back)

Draw

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • editing bool

  • back bool

Draw(spriteBatch, editing, back, overrideColor)

Draw

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • editing bool

  • back bool

  • overrideColor optional Microsoft.Xna.Framework.Color

DrawDecorativeSprites(spriteBatch, drawPos, flipX, flipY, rotation, depth, overrideColor)

DrawDecorativeSprites

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • drawPos Microsoft.Xna.Framework.Vector2

  • flipX bool

  • flipY bool

  • rotation number

  • depth number

  • overrideColor optional Microsoft.Xna.Framework.Color

DrawEditing(spriteBatch, cam)

DrawEditing

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • cam Camera

DrawHUD(spriteBatch, cam, character)

DrawHUD

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • cam Camera

  • character Character

Drop(dropper, createNetworkEvent, setTransform)

Drop

Parameters

  • dropper Character

  • createNetworkEvent bool

  • setTransform bool

EnableDrawableComponent(drawable)

EnableDrawableComponent

Parameters

  • drawable Items.Components.IDrawableComponent

Equals(obj)

Equals

Parameters

  • obj Object

Returns

  • bool

Equip(character)

Equip

Parameters

  • character Character

FindController(tags)

FindController

Parameters

  • tags optional Collections.Immutable.ImmutableArray

Returns

  • Items.Components.Controller

FindHull()

FindHull

Returns

  • Hull

FindParentInventory(predicate)

FindParentInventory

Parameters

  • predicate function

Returns

  • Inventory

FlipX(relativeToSub)

FlipX

Parameters

  • relativeToSub bool

FlipY(relativeToSub)

FlipY

Parameters

  • relativeToSub bool

ForceHUDLayoutUpdate(ignoreLocking)

ForceHUDLayoutUpdate

Parameters

  • ignoreLocking bool

FreeID()

FreeID

GetComponent()

GetComponent

Returns

  • T

GetComponentIndex(component)

GetComponentIndex

Parameters

  • component Items.Components.ItemComponent

Returns

  • number

GetComponentString(component)

GetComponentString

Parameters

Returns

  • Object

GetComponentString(componentName)

Gets a component from an item by a string name.

Parameters

  • componentName

Returns

  • Component

    component

GetComponents()

GetComponents

Returns

  • IEnumerable

GetConnectedComponents(recursive, allowTraversingBackwards, connectionFilter)

GetConnectedComponents

Parameters

  • recursive bool

  • allowTraversingBackwards bool

  • connectionFilter function

Returns

GetConnectedComponentsRecursive(c, ignoreInactiveRelays, allowTraversingBackwards)

GetConnectedComponentsRecursive

Parameters

  • c Items.Components.Connection

  • ignoreInactiveRelays bool

  • allowTraversingBackwards bool

Returns

GetConnectedItemsToSwap(swappingTo)

GetConnectedItemsToSwap

Parameters

  • swappingTo SwappableItem

Returns

GetContainedItemConditionPercentage()

GetContainedItemConditionPercentage

Returns

  • number

GetDirectlyConnectedComponent(connectionFilter)

GetDirectlyConnectedComponent

Parameters

  • connectionFilter function

Returns

  • T

GetDrawDepth()

GetDrawDepth

Returns

  • number

GetDrawDepth(baseDepth, sprite)

GetDrawDepth

Parameters

  • baseDepth number

Returns

  • number

GetHUDTexts(character, recreateHudTexts)

GetHUDTexts

Parameters

  • character Character

  • recreateHudTexts bool

Returns

GetHashCode()

GetHashCode

Returns

  • number

GetInventoryIconColor()

GetInventoryIconColor

Returns

  • Microsoft.Xna.Framework.Color

GetLinkedEntities(list, maxDepth, filter)

GetLinkedEntities

Parameters

  • list HashSet

  • maxDepth optional Int32

  • filter function

Returns

  • HashSet

GetPositionUpdateInterval(recipient)

GetPositionUpdateInterval

Parameters

  • recipient Networking.Client

Returns

  • number

GetProperties()

GetProperties

Returns

GetQualityModifier(statType)

GetQualityModifier

Parameters

  • statType Items.Components.StatType

Returns

  • number

GetReplacementOrThis()

GetReplacementOrThis

Returns

  • MapEntity

GetRootInventoryOwner()

GetRootInventoryOwner

Returns

  • Entity

GetSpriteColor(defaultColor, withHighlight)

GetSpriteColor

Parameters

  • defaultColor optional Microsoft.Xna.Framework.Color

  • withHighlight bool

Returns

  • Microsoft.Xna.Framework.Color

GetStackedItems()

GetStackedItems

Returns

  • IEnumerable

GetTags()

GetTags

Returns

  • IReadOnlyCollection

GetTransformedQuad()

GetTransformedQuad

Returns

  • Quad2D

GetType()

GetType

Returns

  • Type

GetUpgrade(identifier)

GetUpgrade

Parameters

  • identifier Identifier

Returns

  • Upgrade

GetUpgrades()

GetUpgrades

Returns

HasAccess(character)

HasAccess

Parameters

  • character Character

Returns

  • bool

HasIdentifierOrTags(identifiersOrTags)

HasIdentifierOrTags

Parameters

  • identifiersOrTags IEnumerable

Returns

  • bool

HasTag(allowedTags)

HasTag

Parameters

  • allowedTags IEnumerable

Returns

  • bool

HasTag(tag)

HasTag

Parameters

  • tag Identifier

Returns

  • bool

HasUpgrade(identifier)

HasUpgrade

Parameters

  • identifier Identifier

Returns

  • bool

HasVisibleInteraction(character)

HasVisibleInteraction

Parameters

  • character Character

Returns

  • bool

IgnoreByAI(character)

IgnoreByAI

Parameters

  • character Character

Returns

  • bool

InitSpriteStates()

InitSpriteStates

IsContainerPreferred(container, isPreferencesDefined, isSecondary, requireConditionRestriction)

IsContainerPreferred

Parameters

  • container Items.Components.ItemContainer

  • isPreferencesDefined Boolean&

  • isSecondary Boolean&

  • requireConditionRestriction bool

Returns

  • bool

IsInsideTrigger(worldPosition, transformedTrigger)

IsInsideTrigger

Parameters

  • worldPosition Microsoft.Xna.Framework.Vector2

  • transformedTrigger Microsoft.Xna.Framework.Rectangle&

Returns

  • bool

IsInsideTrigger(worldPosition)

IsInsideTrigger

Parameters

  • worldPosition Microsoft.Xna.Framework.Vector2

Returns

  • bool

IsInteractable(character)

IsInteractable

Parameters

  • character Character

Returns

  • bool

IsMouseOn(position)

IsMouseOn

Parameters

  • position Microsoft.Xna.Framework.Vector2

Returns

  • bool

IsOwnedBy(entity)

IsOwnedBy

Parameters

  • entity Entity

Returns

  • bool

IsVisible(worldView)

IsVisible

Parameters

  • worldView Microsoft.Xna.Framework.Rectangle

Returns

  • bool

Item(itemPrefab, position, submarine, id, callOnItemLoaded)

Item

Parameters

  • itemPrefab ItemPrefab

  • position Microsoft.Xna.Framework.Vector2

  • id number

  • callOnItemLoaded bool

Item(newRect, itemPrefab, submarine, callOnItemLoaded, id)

Item

Parameters

  • newRect Microsoft.Xna.Framework.Rectangle

  • itemPrefab ItemPrefab

  • callOnItemLoaded bool

  • id number

Item.Load(element, submarine, createNetworkEvent, idRemap)

Load

Parameters

  • element ContentXElement

  • createNetworkEvent bool

  • idRemap IdRemap

Returns

Item.Load(element, submarine, idRemap)

Load

Parameters

  • element ContentXElement

  • idRemap IdRemap

Returns

Item.ReadSpawnData(msg, spawn)

ReadSpawnData

Parameters

  • msg Networking.IReadMessage

  • spawn bool

Returns

Item.RemoveByPrefab(prefab)

RemoveByPrefab

Parameters

  • prefab ItemPrefab

Item.UpdateHulls()

UpdateHulls

Item.UpdatePendingConditionUpdates(deltaTime)

UpdatePendingConditionUpdates

Parameters

  • deltaTime number

Move(amount, ignoreContacts)

Move

Parameters

  • amount Microsoft.Xna.Framework.Vector2

  • ignoreContacts bool

OnMapLoaded()

OnMapLoaded

OnPlayerSkillsChanged()

OnPlayerSkillsChanged

RecalculateConditionValues()

RecalculateConditionValues

Remove()

Remove

RemoveContained(contained)

RemoveContained

Parameters

RemoveLinked(e)

RemoveLinked

Parameters

  • e MapEntity

RemoveTag(tag)

RemoveTag

Parameters

  • tag Identifier

ReplaceTag(tag, newTag)

ReplaceTag

Parameters

  • tag Identifier

  • newTag Identifier

ReplaceTag(tag, newTag)

ReplaceTag

Parameters

ReplaceWithLinkedItems(replacement)

ReplaceWithLinkedItems

Parameters

  • replacement ItemPrefab

Reset()

Reset

ResetCachedVisibleSize()

ResetCachedVisibleSize

ResetWaterDragCoefficient()

ResetWaterDragCoefficient

Save(parentElement)

Save

Parameters

  • parentElement Xml.Linq.XElement

Returns

  • Xml.Linq.XElement

SecondaryUse(deltaTime, character)

SecondaryUse

Parameters

  • deltaTime number

  • character Character

SendPendingNetworkUpdates()

SendPendingNetworkUpdates

SendSignal(signal, connection)

SendSignal

Parameters

  • signal Items.Components.Signal

  • connection Items.Components.Connection

SendSignal(signal, connectionName)

SendSignal

Parameters

SendSignal(signal, connectionName)

SendSignal

Parameters

  • signal Items.Components.Signal

SendSignal(signalOrString, connectionOrConnectionName)

Sends a signal.

Parameters

  • signalOrString

  • connectionOrConnectionName

ServerEventRead(msg, c)

ServerEventRead

Parameters

  • msg Networking.IReadMessage

  • c Networking.Client

ServerEventWrite(msg, c, extraData)

ServerEventWrite

Parameters

  • msg Networking.IWriteMessage

  • c Networking.Client

  • extraData Networking.IData

ServerWritePosition(tempBuffer, c)

ServerWritePosition

Parameters

  • tempBuffer Networking.ReadWriteMessage

  • c Networking.Client

SetActiveSprite()

SetActiveSprite

SetContainedItemPositions()

SetContainedItemPositions

SetTransform(simPosition, rotation, findNewHull, setPrevTransform)

SetTransform

Parameters

  • simPosition Microsoft.Xna.Framework.Vector2

  • rotation number

  • findNewHull bool

  • setPrevTransform bool

SetUpgrade(upgrade, createNetworkEvent)

SetUpgrade

Parameters

  • upgrade Upgrade

  • createNetworkEvent bool

ShallowRemove()

ShallowRemove

ToString()

ToString

Returns

TransformTrigger(trigger, world)

TransformTrigger

Parameters

  • trigger Microsoft.Xna.Framework.Rectangle

  • world bool

Returns

  • Microsoft.Xna.Framework.Rectangle

TryCreateServerEventSpam()

TryCreateServerEventSpam

TryFindController(controller, tags)

TryFindController

Parameters

  • controller Items.Components.Controller&

  • tags optional Collections.Immutable.ImmutableArray

Returns

  • bool

TryInteract(user, ignoreRequiredItems, forceSelectKey, forceUseKey)

TryInteract

Parameters

  • user Character

  • ignoreRequiredItems bool

  • forceSelectKey bool

  • forceUseKey bool

Returns

  • bool

Unequip(character)

Unequip

Parameters

  • character Character

Update(deltaTime, cam)

Update

Parameters

  • deltaTime number

  • cam Camera

UpdateEditing(cam, deltaTime)

UpdateEditing

Parameters

  • cam Camera

  • deltaTime number

UpdateHUD(cam, character, deltaTime)

UpdateHUD

Parameters

  • cam Camera

  • character Character

  • deltaTime number

UpdateSpriteStates(deltaTime)

UpdateSpriteStates

Parameters

  • deltaTime number

UpdateTransform()

UpdateTransform

Use(deltaTime, user, targetLimb, useTarget, userForOnUsedEvent)

Use

Parameters

  • deltaTime number

  • user Character

  • targetLimb Limb

  • useTarget Entity

  • userForOnUsedEvent Character

WriteSpawnData(msg, entityID, originalInventoryID, originalItemContainerIndex, originalSlotIndex)

WriteSpawnData

Parameters

  • msg Networking.IWriteMessage

  • entityID number

  • originalInventoryID number

  • originalItemContainerIndex number

  • originalSlotIndex number

Fields

ActiveHUDs

ActiveHUDs, field of type IEnumerable

  • ActiveHUDs

AiTarget

AiTarget, field of type AITarget

  • AiTarget

AllPropertyObjects

AllPropertyObjects, field of type IReadOnlyList

  • AllPropertyObjects

AllowDeconstruct

AllowDeconstruct, field of type bool

  • AllowDeconstruct

AllowStealing

AllowStealing, field of type bool

  • AllowStealing

AllowSwapping

AllowSwapping, field of type bool

  • AllowSwapping

AllowedSlots

AllowedSlots, field of type IEnumerable

  • AllowedSlots

AvailableSwaps

AvailableSwaps, field of type HashSet

  • AvailableSwaps

BodyType

BodyType, field of type FarseerPhysics.BodyType

  • BodyType

CampaignInteractionType

CampaignInteractionType, field of type InteractionType

  • CampaignInteractionType

Color

Color, field of type Microsoft.Xna.Framework.Color

  • Color

Components

Components, field of type table

  • Components

Condition

Condition, field of type number

  • Condition

ConditionIncreasedRecently

ConditionIncreasedRecently, field of type bool

  • ConditionIncreasedRecently

ConditionPercentage

ConditionPercentage, field of type number

  • ConditionPercentage

ConditionPercentageRelativeToDefaultMaxCondition

ConditionPercentageRelativeToDefaultMaxCondition, field of type number

  • ConditionPercentageRelativeToDefaultMaxCondition

ConfigFilePath

ConfigFilePath, field of type ContentPath

  • ConfigFilePath

Connections

Connections, field of type table

  • Connections

ContainedItems

ContainedItems, field of type IEnumerable

  • ContainedItems

Container

Container, field of type Item

  • Container

ContainerColor

ContainerColor, field of type Microsoft.Xna.Framework.Color

  • ContainerColor

ContainerIdentifier

ContainerIdentifier, field of type Identifier

  • ContainerIdentifier

CreationIndex

CreationIndex, field of type number

  • CreationIndex

CreationStackTrace

CreationStackTrace, field of type string

  • CreationStackTrace

CurrentHull

CurrentHull, field of type Hull

  • CurrentHull

DefaultRect

DefaultRect, field of type Microsoft.Xna.Framework.Rectangle

  • DefaultRect

Description

Description, field of type string

  • Description

DescriptionTag

DescriptionTag, field of type string

  • DescriptionTag

DisallowedUpgradeSet

DisallowedUpgradeSet, field of type HashSet

  • DisallowedUpgradeSet

DisallowedUpgrades

DisallowedUpgrades, field of type string

  • DisallowedUpgrades

DisplaySideBySideWhenLinked

DisplaySideBySideWhenLinked, field of type bool

  • DisplaySideBySideWhenLinked

DontCleanUp

DontCleanUp, field of type bool

  • DontCleanUp

DrawBelowWater

DrawBelowWater, field of type bool

  • DrawBelowWater

DrawDepthOffset

DrawDepthOffset, field of type number

  • DrawDepthOffset

DrawOverWater

DrawOverWater, field of type bool

  • DrawOverWater

DrawPosition

DrawPosition, field of type Microsoft.Xna.Framework.Vector2

  • DrawPosition

DroppedStack

DroppedStack, field of type IEnumerable

  • DroppedStack

EditableWhenEquipped

EditableWhenEquipped, field of type bool

  • EditableWhenEquipped

Equipper

Equipper, field of type Character

  • Equipper

ErrorLine

ErrorLine, field of type string

  • ErrorLine

ExternalHighlight

ExternalHighlight, field of type bool

  • ExternalHighlight

FakeBroken

FakeBroken, field of type bool

  • FakeBroken

FireProof

FireProof, field of type bool

  • FireProof

FlippedX

FlippedX, field of type bool

  • FlippedX

FlippedY

FlippedY, field of type bool

  • FlippedY

FullyInitialized

FullyInitialized, field of type bool

  • FullyInitialized

HasBallastFloraInHull

HasBallastFloraInHull, field of type bool

  • HasBallastFloraInHull

Health

Health, field of type number

  • Health

HealthMultiplier

HealthMultiplier, field of type number

  • HealthMultiplier

HiddenInGame

HiddenInGame, field of type bool

  • HiddenInGame

HighlightColor

HighlightColor, field of type ?Microsoft.Xna.Framework.Color

  • HighlightColor

HullOxygenPercentage

HullOxygenPercentage, field of type number

  • HullOxygenPercentage

ID

ID, field of type number

  • ID

IconStyle

IconStyle, field of type GUIComponentStyle

  • IconStyle

IdFreed

IdFreed, field of type bool

  • IdFreed

Illegitimate

Illegitimate, field of type bool

  • Illegitimate

ImpactTolerance

ImpactTolerance, field of type number

  • ImpactTolerance

InBeaconStation

InBeaconStation, field of type bool

  • InBeaconStation

InDetectable

InDetectable, field of type bool

  • InDetectable

InPlayerSubmarine

InPlayerSubmarine, field of type bool

  • InPlayerSubmarine

InWater

InWater, field of type bool

  • InWater

Indestructible

Indestructible, field of type bool

  • Indestructible

Infector

Infector, field of type MapCreatures.Behavior.BallastFloraBranch

  • Infector

InteractDistance

InteractDistance, field of type number

  • InteractDistance

InteractPriority

InteractPriority, field of type number

  • InteractPriority

InteractionRect

InteractionRect, field of type Microsoft.Xna.Framework.Rectangle

  • InteractionRect

InventoryIconColor

InventoryIconColor, field of type Microsoft.Xna.Framework.Color

  • InventoryIconColor

InvulnerableToDamage

InvulnerableToDamage, field of type bool

  • InvulnerableToDamage

IsClaimedByBallastFlora

IsClaimedByBallastFlora, field of type bool

  • IsClaimedByBallastFlora

IsContained

IsContained, field of type bool

  • IsContained

IsFullCondition

IsFullCondition, field of type bool

  • IsFullCondition

IsHidden

IsHidden, field of type bool

  • IsHidden

IsHighlighted

IsHighlighted, field of type bool

  • IsHighlighted

IsIncludedInSelection

IsIncludedInSelection, field of type bool

  • IsIncludedInSelection

IsLadder

IsLadder, field of type bool

  • IsLadder

IsLayerHidden

IsLayerHidden, field of type bool

  • IsLayerHidden

IsPlayerTeamInteractable

IsPlayerTeamInteractable, field of type bool

  • IsPlayerTeamInteractable

IsSalvageMissionItem

IsSalvageMissionItem, field of type bool

  • IsSalvageMissionItem

IsSecondaryItem

IsSecondaryItem, field of type bool

  • IsSecondaryItem

IsSelected

IsSelected, field of type bool

  • IsSelected

IsShootable

IsShootable, field of type bool

  • IsShootable

Item.CleanableItems

Item.CleanableItems, field of type IReadOnlyCollection

Item.DangerousItems

Item.DangerousItems, field of type IReadOnlyCollection

Item.DeconstructItems

Item.DeconstructItems, field of type HashSet

Item.ImpactSoundInterval

Item.ImpactSoundInterval, field of type number

Item.ItemList

Item.ItemList, field of type table

Item.ItemList

Item.ItemList, Table containing all items.

Item.RepairableItems

Item.RepairableItems, field of type IReadOnlyCollection

Item.ShowItems

Item.ShowItems, field of type bool

Item.ShowWires

Item.ShowWires, field of type bool

Item.SonarVisibleItems

Item.SonarVisibleItems, field of type IReadOnlyCollection

Item.connectionPairs

Item.connectionPairs, field of type Collections.Immutable.ImmutableArray>

LastEatenTime

LastEatenTime, field of type number

  • LastEatenTime

LastImpactSoundTime

LastImpactSoundTime, field of type number

  • LastImpactSoundTime

LastSentSignalRecipients

LastSentSignalRecipients, field of type table

  • LastSentSignalRecipients

Layer

Layer, field of type string

  • Layer

Linkable

Linkable, field of type bool

  • Linkable

MaxCondition

MaxCondition, field of type number

  • MaxCondition

MaxRepairConditionMultiplier

MaxRepairConditionMultiplier, field of type number

  • MaxRepairConditionMultiplier

Name

Name, field of type string

  • Name

NonInteractable

NonInteractable, field of type bool

  • NonInteractable

NonPlayerTeamInteractable

NonPlayerTeamInteractable, field of type bool

  • NonPlayerTeamInteractable

OffsetOnSelectedMultiplier

OffsetOnSelectedMultiplier, field of type number

  • OffsetOnSelectedMultiplier

OnDeselect

OnDeselect, field of type Action

  • OnDeselect

OnInteract

OnInteract, field of type Action

  • OnInteract

OrderedToBeIgnored

OrderedToBeIgnored, field of type bool

  • OrderedToBeIgnored

OriginalContainerIndex

OriginalContainerIndex, field of type number

  • OriginalContainerIndex

OriginalModuleIndex

OriginalModuleIndex, field of type number

  • OriginalModuleIndex

OriginalOutpost

OriginalOutpost, field of type string

  • OriginalOutpost

OwnInventories

OwnInventories, field of type Collections.Immutable.ImmutableArray

  • OwnInventories

OwnInventory

OwnInventory, field of type ItemInventory

  • OwnInventory

ParentInventory

ParentInventory, field of type Inventory

  • ParentInventory

PendingItemSwap

PendingItemSwap, field of type ItemPrefab

  • PendingItemSwap

PhysicsBodyActive

PhysicsBodyActive, field of type bool

  • PhysicsBodyActive

Position

Position, field of type Microsoft.Xna.Framework.Vector2

  • Position

PositionUpdateInterval

PositionUpdateInterval, field of type number

  • PositionUpdateInterval

PositionX

PositionX, field of type number

  • PositionX

PositionY

PositionY, field of type number

  • PositionY

Prefab

Prefab, field of type ItemPrefab

  • Prefab

Prefab

Prefab, ItemPrefab containing the original prefab of the item.

  • Prefab ItemPrefab

Prefab

Prefab, field of type MapEntityPrefab

  • Prefab

PreviousParentInventory

PreviousParentInventory, field of type Inventory

  • PreviousParentInventory

PurchasedNewSwap

PurchasedNewSwap, field of type bool

  • PurchasedNewSwap

Quality

Quality, field of type number

  • Quality

Rect

Rect, field of type Microsoft.Xna.Framework.Rectangle

  • Rect

RectHeight

RectHeight, field of type number

  • RectHeight

RectWidth

RectWidth, field of type number

  • RectWidth

RemoveIfLinkedOutpostDoorInUse

RemoveIfLinkedOutpostDoorInUse, field of type bool

  • RemoveIfLinkedOutpostDoorInUse

Removed

Removed, field of type bool

  • Removed

Repairables

Repairables, field of type table

  • Repairables

ReplacedBy

ReplacedBy, field of type MapEntity

  • ReplacedBy

RequireAimToSecondaryUse

RequireAimToSecondaryUse, field of type bool

  • RequireAimToSecondaryUse

RequireAimToUse

RequireAimToUse, field of type bool

  • RequireAimToUse

ResizeHorizontal

ResizeHorizontal, field of type bool

  • ResizeHorizontal

ResizeVertical

ResizeVertical, field of type bool

  • ResizeVertical

RootContainer

RootContainer, field of type Item

  • RootContainer

Rotation

Rotation, field of type number

  • Rotation

RotationRad

RotationRad, field of type number

  • RotationRad

Scale

Scale, field of type number

  • Scale

SelectableInEditor

SelectableInEditor, field of type bool

  • SelectableInEditor

SerializableProperties

SerializableProperties, field of type table

  • SerializableProperties

ShouldBeSaved

ShouldBeSaved, field of type bool

  • ShouldBeSaved

SightRange

SightRange, field of type number

  • SightRange

SimPosition

SimPosition, field of type Microsoft.Xna.Framework.Vector2

  • SimPosition

SonarLabel

SonarLabel, field of type string

  • SonarLabel

SoundRange

SoundRange, field of type number

  • SoundRange

SpawnTime

SpawnTime, field of type number

  • SpawnTime

SpawnedInCurrentOutpost

SpawnedInCurrentOutpost, field of type bool

  • SpawnedInCurrentOutpost

Speed

Speed, field of type number

  • Speed

Sprite

Sprite, field of type Sprite

  • Sprite

SpriteColor

SpriteColor, field of type Microsoft.Xna.Framework.Color

  • SpriteColor

SpriteDepth

SpriteDepth, field of type number

  • SpriteDepth

SpriteDepthOverrideIsSet

SpriteDepthOverrideIsSet, field of type bool

  • SpriteDepthOverrideIsSet

SpriteEffects

SpriteEffects, field of type Microsoft.Xna.Framework.Graphics.SpriteEffects

  • SpriteEffects

SpriteOverrideDepth

SpriteOverrideDepth, field of type number

  • SpriteOverrideDepth

StatManager

StatManager, field of type ItemStatManager

  • StatManager

StaticBodyConfig

StaticBodyConfig, field of type Xml.Linq.XElement

  • StaticBodyConfig

StaticFixtures

StaticFixtures, field of type table

  • StaticFixtures

StolenDuringRound

StolenDuringRound, field of type bool

  • StolenDuringRound

Submarine

Submarine, field of type Submarine

  • Submarine

Tags

Tags, field of type string

  • Tags

UseInHealthInterface

UseInHealthInterface, field of type bool

  • UseInHealthInterface

Visible

Visible, field of type bool

  • Visible

WaterDragCoefficient

WaterDragCoefficient, field of type number

  • WaterDragCoefficient

WaterProof

WaterProof, field of type bool

  • WaterProof

WorldPosition

WorldPosition, field of type Microsoft.Xna.Framework.Vector2

  • WorldPosition

WorldPosition

WorldPosition, Vector2 position of the item in the world

  • WorldPosition Vector2

WorldPositionX

WorldPositionX, field of type number

  • WorldPositionX

WorldPositionY

WorldPositionY, field of type number

  • WorldPositionY

WorldRect

WorldRect, field of type Microsoft.Xna.Framework.Rectangle

  • WorldRect

body

Physics body of the item.

  • body PhysicsBody

Example Usage

Item.ItemList[1].body.position = CreateVector2(0, 0) -- teleports first item created to 0, 0 of the level

body

body, field of type PhysicsBody

  • body

linkedTo

linkedTo, field of type table

  • linkedTo

unresolvedLinkedToID

unresolvedLinkedToID, field of type table

  • unresolvedLinkedToID