Structure

Barotrauma.Structure

Functions

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

AddDamage(sectionIndex, damage, attacker, emitParticles, createWallDamageProjectiles)

AddDamage

Parameters

  • sectionIndex number

  • damage number

  • attacker Character

  • emitParticles bool

  • createWallDamageProjectiles bool

AddLinked(entity)

AddLinked

Parameters

  • entity MapEntity

AddToGUIUpdateList(order)

AddToGUIUpdateList

Parameters

  • order number

AddUpgrade(upgrade, createNetworkEvent)

AddUpgrade

Parameters

  • upgrade Upgrade

  • createNetworkEvent bool

Returns

  • bool

AllSectionBodiesDisabled()

AllSectionBodiesDisabled

Returns

  • bool

ClientEventRead(msg, sendingTime)

ClientEventRead

Parameters

  • msg Networking.IReadMessage

  • sendingTime number

Clone()

Clone

Returns

  • MapEntity

CreateEditingHUD(inGame)

CreateEditingHUD

Parameters

  • inGame bool

Returns

  • GUIComponent

Draw(spriteBatch, editing, back)

Draw

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • editing bool

  • back bool

DrawDamage(spriteBatch, damageEffect, editing)

DrawDamage

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • damageEffect Microsoft.Xna.Framework.Graphics.Effect

  • editing bool

DrawEditing(spriteBatch, cam)

DrawEditing

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • cam Camera

Equals(obj)

Equals

Parameters

  • obj Object

Returns

  • bool

FindSectionIndex(displayPos, world, clamp)

FindSectionIndex

Parameters

  • displayPos Microsoft.Xna.Framework.Vector2

  • world bool

  • clamp bool

Returns

  • number

FlipX(relativeToSub)

FlipX

Parameters

  • relativeToSub bool

FlipY(relativeToSub)

FlipY

Parameters

  • relativeToSub bool

FreeID()

FreeID

GetDrawDepth()

GetDrawDepth

Returns

  • number

GetDrawDepth(baseDepth, sprite)

GetDrawDepth

Parameters

  • baseDepth number

Returns

  • number

GetHashCode()

GetHashCode

Returns

  • number

GetLinkedEntities(list, maxDepth, filter)

GetLinkedEntities

Parameters

  • list HashSet

  • maxDepth optional Int32

  • filter function

Returns

  • HashSet

GetReplacementOrThis()

GetReplacementOrThis

Returns

  • MapEntity

GetSection(sectionIndex)

GetSection

Parameters

  • sectionIndex number

Returns

  • WallSection

GetTransformedQuad()

GetTransformedQuad

Returns

  • Quad2D

GetType()

GetType

Returns

  • Type

GetUpgrade(identifier)

GetUpgrade

Parameters

  • identifier Identifier

Returns

  • Upgrade

GetUpgrades()

GetUpgrades

Returns

HasUpgrade(identifier)

HasUpgrade

Parameters

  • identifier Identifier

Returns

  • bool

IsMouseOn(position)

IsMouseOn

Parameters

  • position Microsoft.Xna.Framework.Vector2

Returns

  • bool

IsVisible(worldView)

IsVisible

Parameters

  • worldView Microsoft.Xna.Framework.Rectangle

Returns

  • bool

Move(amount, ignoreContacts)

Move

Parameters

  • amount Microsoft.Xna.Framework.Vector2

  • ignoreContacts bool

OnMapLoaded()

OnMapLoaded

Remove()

Remove

RemoveLinked(e)

RemoveLinked

Parameters

  • e MapEntity

Reset()

Reset

Save(parentElement)

Save

Parameters

  • parentElement Xml.Linq.XElement

Returns

  • Xml.Linq.XElement

SectionBodyDisabled(sectionIndex)

SectionBodyDisabled

Parameters

  • sectionIndex number

Returns

  • bool

SectionDamage(sectionIndex)

SectionDamage

Parameters

  • sectionIndex number

Returns

  • number

SectionIsLeaking(sectionIndex)

SectionIsLeaking

Parameters

  • sectionIndex number

Returns

  • bool

SectionIsLeakingFromOutside(sectionIndex)

SectionIsLeakingFromOutside

Parameters

  • sectionIndex number

Returns

  • bool

SectionLength(sectionIndex)

SectionLength

Parameters

  • sectionIndex number

Returns

  • number

SectionPosition(sectionIndex, world)

SectionPosition

Parameters

  • sectionIndex number

  • world bool

Returns

  • Microsoft.Xna.Framework.Vector2

ServerEventWrite(msg, c, extraData)

ServerEventWrite

Parameters

  • msg Networking.IWriteMessage

  • c Networking.Client

  • extraData Networking.IData

SetCollisionCategory(collisionCategory)

SetCollisionCategory

Parameters

  • collisionCategory FarseerPhysics.Dynamics.Category

SetDamage(sectionIndex, damage, attacker, createNetworkEvent, isNetworkEvent, createExplosionEffect, createWallDamageProjectiles)

SetDamage

Parameters

  • sectionIndex number

  • damage number

  • attacker Character

  • createNetworkEvent bool

  • isNetworkEvent bool

  • createExplosionEffect bool

  • createWallDamageProjectiles bool

SetUpgrade(upgrade, createNetworkEvent)

SetUpgrade

Parameters

  • upgrade Upgrade

  • createNetworkEvent bool

ShallowRemove()

ShallowRemove

Structure(rectangle, sp, submarine, id, element)

Structure

Parameters

  • rectangle Microsoft.Xna.Framework.Rectangle

  • sp StructurePrefab

  • id number

  • element Xml.Linq.XElement

Structure.FindPrefab(name, identifier)

FindPrefab

Parameters

  • identifier Identifier

Returns

  • StructurePrefab

Structure.GetAttachTarget(worldPosition)

GetAttachTarget

Parameters

  • worldPosition Microsoft.Xna.Framework.Vector2

Returns

Structure.Load(element, submarine, idRemap)

Load

Parameters

  • element ContentXElement

  • idRemap IdRemap

Returns

Structure.UpgradeTextureOffset(targetSize, originalTextureOffset, submarineInfo, sourceRect, scale, flippedX, flippedY)

UpgradeTextureOffset

Parameters

  • targetSize Microsoft.Xna.Framework.Vector2

  • originalTextureOffset Microsoft.Xna.Framework.Vector2

  • submarineInfo SubmarineInfo

  • sourceRect Microsoft.Xna.Framework.Rectangle

  • scale Microsoft.Xna.Framework.Vector2

  • flippedX bool

  • flippedY bool

Returns

  • Microsoft.Xna.Framework.Vector2

ToString()

ToString

Returns

Update(deltaTime, cam)

Update

Parameters

  • deltaTime number

  • cam Camera

UpdateEditing(cam, deltaTime)

UpdateEditing

Parameters

  • cam Camera

  • deltaTime number

UpdateSpriteStates(deltaTime)

UpdateSpriteStates

Parameters

  • deltaTime number

Fields

AiTarget

AiTarget, field of type AITarget

  • AiTarget

Bodies

Bodies, field of type table

  • Bodies

BodyHeight

BodyHeight, field of type number

  • BodyHeight

BodyOffset

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

  • BodyOffset

BodyRotation

BodyRotation, field of type number

  • BodyRotation

BodyWidth

BodyWidth, field of type number

  • BodyWidth

CastShadow

CastShadow, field of type bool

  • CastShadow

CreationIndex

CreationIndex, field of type number

  • CreationIndex

CreationStackTrace

CreationStackTrace, field of type string

  • CreationStackTrace

CrushDepth

CrushDepth, field of type number

  • CrushDepth

DefaultRect

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

  • DefaultRect

DisallowedUpgradeSet

DisallowedUpgradeSet, field of type HashSet

  • DisallowedUpgradeSet

DisallowedUpgrades

DisallowedUpgrades, field of type string

  • DisallowedUpgrades

DrawBelowWater

DrawBelowWater, field of type bool

  • DrawBelowWater

DrawDamageEffect

DrawDamageEffect, field of type bool

  • DrawDamageEffect

DrawOverWater

DrawOverWater, field of type bool

  • DrawOverWater

DrawPosition

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

  • DrawPosition

DropShadowOffset

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

  • DropShadowOffset

ErrorLine

ErrorLine, field of type string

  • ErrorLine

ExternalHighlight

ExternalHighlight, field of type bool

  • ExternalHighlight

FlippedX

FlippedX, field of type bool

  • FlippedX

FlippedY

FlippedY, field of type bool

  • FlippedY

HasBody

HasBody, field of type bool

  • HasBody

HasDamage

HasDamage, field of type bool

  • HasDamage

Health

Health, field of type number

  • Health

HiddenInGame

HiddenInGame, field of type bool

  • HiddenInGame

ID

ID, field of type number

  • ID

IdFreed

IdFreed, field of type bool

  • IdFreed

InDetectable

InDetectable, field of type bool

  • InDetectable

Indestructible

Indestructible, field of type bool

  • Indestructible

IsHidden

IsHidden, field of type bool

  • IsHidden

IsHighlighted

IsHighlighted, field of type bool

  • IsHighlighted

IsHorizontal

IsHorizontal, field of type bool

  • IsHorizontal

IsIncludedInSelection

IsIncludedInSelection, field of type bool

  • IsIncludedInSelection

IsLayerHidden

IsLayerHidden, field of type bool

  • IsLayerHidden

IsPlatform

IsPlatform, field of type bool

  • IsPlatform

IsSelected

IsSelected, field of type bool

  • IsSelected

Layer

Layer, field of type string

  • Layer

Lights

Lights, field of type table

  • Lights

Linkable

Linkable, field of type bool

  • Linkable

MaxHealth

MaxHealth, field of type number

  • MaxHealth

Name

Name, field of type string

  • Name

NoAITarget

NoAITarget, field of type bool

  • NoAITarget

OriginalContainerIndex

OriginalContainerIndex, field of type number

  • OriginalContainerIndex

OriginalModuleIndex

OriginalModuleIndex, field of type number

  • OriginalModuleIndex

Position

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

  • Position

Prefab

Prefab, field of type MapEntityPrefab

  • Prefab

Prefab

Prefab, field of type StructurePrefab

  • Prefab

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

ReplacedBy

ReplacedBy, field of type MapEntity

  • ReplacedBy

ResizeHorizontal

ResizeHorizontal, field of type bool

  • ResizeHorizontal

ResizeVertical

ResizeVertical, field of type bool

  • ResizeVertical

Rotation

Rotation, field of type number

  • Rotation

Scale

Scale, field of type number

  • Scale

ScaleWhenTextureOffsetSet

ScaleWhenTextureOffsetSet, field of type number

  • ScaleWhenTextureOffsetSet

SectionCount

SectionCount, field of type number

  • SectionCount

Sections

Sections, field of type WallSection[]

  • Sections

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

SoundRange

SoundRange, field of type number

  • SoundRange

SpawnTime

SpawnTime, field of type number

  • SpawnTime

SpecialTag

SpecialTag, field of type string

  • SpecialTag

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

StairDirection

StairDirection, field of type Direction

  • StairDirection

Structure.ShowStructures

Structure.ShowStructures, field of type bool

Structure.ShowWalls

Structure.ShowWalls, field of type bool

Structure.WallList

Structure.WallList, field of type table

Structure.WallSectionSize

Structure.WallSectionSize, field of type number

Submarine

Submarine, field of type Submarine

  • Submarine

Tags

Tags, field of type Collections.Immutable.ImmutableHashSet

  • Tags

TextureOffset

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

  • TextureOffset

TextureScale

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

  • TextureScale

UseDropShadow

UseDropShadow, field of type bool

  • UseDropShadow

WorldPosition

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

  • WorldPosition

WorldRect

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

  • WorldRect

linkedTo

linkedTo, field of type table

  • linkedTo

unresolvedLinkedToID

unresolvedLinkedToID, field of type table

  • unresolvedLinkedToID