Level

Barotrauma.Level

Functions

CheckBeaconActive()

CheckBeaconActive

Returns

  • bool

ClientEventRead(msg, sendingTime)

ClientEventRead

Parameters

  • msg Networking.IReadMessage

  • sendingTime number

DamageBeaconStationDevices(breakDeviceProbability)

DamageBeaconStationDevices

Parameters

  • breakDeviceProbability number

DamageBeaconStationWalls(damageWallProbability)

DamageBeaconStationWalls

Parameters

  • damageWallProbability number

DebugSetEndLocation(newEndLocation)

DebugSetEndLocation

Parameters

  • newEndLocation Location

DebugSetStartLocation(newStartLocation)

DebugSetStartLocation

Parameters

  • newStartLocation Location

DisconnectBeaconStationWires(disconnectWireProbability)

DisconnectBeaconStationWires

Parameters

  • disconnectWireProbability number

DrawBack(graphics, spriteBatch, cam)

DrawBack

Parameters

  • graphics Microsoft.Xna.Framework.Graphics.GraphicsDevice

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • cam Camera

DrawDebugOverlay(spriteBatch, cam)

DrawDebugOverlay

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • cam Camera

DrawFront(spriteBatch, cam)

DrawFront

Parameters

  • spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

  • cam Camera

Equals(obj)

Equals

Parameters

  • obj Object

Returns

  • bool

FreeID()

FreeID

GenerateMissionResources(prefab, requiredAmount, positionType, targetCaves)

GenerateMissionResources

Parameters

  • prefab ItemPrefab

  • requiredAmount number

  • positionType PositionType

  • targetCaves IEnumerable

Returns

GetAllCells()

GetAllCells

Returns

GetBottomPosition(xPosition)

GetBottomPosition

Parameters

  • xPosition number

Returns

  • Microsoft.Xna.Framework.Vector2

GetCells(worldPos, searchDepth)

GetCells

Parameters

  • worldPos Microsoft.Xna.Framework.Vector2

  • searchDepth number

Returns

GetClosestCell(worldPos)

GetClosestCell

Parameters

  • worldPos Microsoft.Xna.Framework.Vector2

Returns

  • Voronoi2.VoronoiCell

GetHashCode()

GetHashCode

Returns

  • number

GetRandomItemPos(spawnPosType, randomSpread, minDistFromSubs, offsetFromWall, filter)

GetRandomItemPos

Parameters

  • spawnPosType PositionType

  • randomSpread number

  • minDistFromSubs number

  • offsetFromWall number

  • filter function

Returns

  • Microsoft.Xna.Framework.Vector2

GetRealWorldDepth(worldPositionY)

GetRealWorldDepth

Parameters

  • worldPositionY number

Returns

  • number

GetTooCloseCells(position, minDistance)

GetTooCloseCells

Parameters

  • position Microsoft.Xna.Framework.Vector2

  • minDistance number

Returns

GetType()

GetType

Returns

IsAllowedDifficulty(minDifficulty, maxDifficulty)

IsAllowedDifficulty

Parameters

  • minDifficulty number

  • maxDifficulty number

Returns

  • bool

IsCloseToEnd(position, minDist)

IsCloseToEnd

Parameters

  • position Microsoft.Xna.Framework.Point

  • minDist number

Returns

  • bool

IsCloseToEnd(position, minDist)

IsCloseToEnd

Parameters

  • position Microsoft.Xna.Framework.Vector2

  • minDist number

Returns

  • bool

IsCloseToStart(position, minDist)

IsCloseToStart

Parameters

  • position Microsoft.Xna.Framework.Point

  • minDist number

Returns

  • bool

IsCloseToStart(position, minDist)

IsCloseToStart

Parameters

  • position Microsoft.Xna.Framework.Vector2

  • minDist number

Returns

  • bool

IsPositionInsideWall(worldPosition)

IsPositionInsideWall

Parameters

  • worldPosition Microsoft.Xna.Framework.Vector2

Returns

  • bool

Level.Generate(levelData, mirror, startLocation, endLocation, startOutpost, endOutpost)

Generate

Parameters

  • mirror bool

  • startLocation Location

  • endLocation Location

  • startOutpost SubmarineInfo

  • endOutpost SubmarineInfo

Returns

  • Level

Level.IsPositionAboveLevel(worldPosition)

IsPositionAboveLevel

Parameters

  • worldPosition Microsoft.Xna.Framework.Vector2

Returns

  • bool

PrepareBeaconStation()

PrepareBeaconStation

ReloadTextures()

ReloadTextures

Remove()

Remove

ServerEventWrite(msg, c, extraData)

ServerEventWrite

Parameters

  • msg Networking.IWriteMessage

  • c Networking.Client

  • extraData Networking.IData

ShouldSpawnCrewInsideOutpost()

ShouldSpawnCrewInsideOutpost

Returns

  • bool

SpawnCorpses()

SpawnCorpses

SpawnNPCs()

SpawnNPCs

ToString()

ToString

Returns

TryGetInterestingPosition(useSyncedRand, positionType, minDistFromSubs, position, filter, suppressWarning)

TryGetInterestingPosition

Parameters

  • useSyncedRand bool

  • positionType PositionType

  • minDistFromSubs number

  • position InterestingPosition&

  • filter function

  • suppressWarning bool

Returns

  • bool

TryGetInterestingPosition(useSyncedRand, positionType, minDistFromSubs, position, awayPoint, minDistFromPoint, filter, suppressWarning)

TryGetInterestingPosition

Parameters

  • useSyncedRand bool

  • positionType PositionType

  • minDistFromSubs number

  • position InterestingPosition&

  • awayPoint Microsoft.Xna.Framework.Vector2

  • minDistFromPoint number

  • filter function

  • suppressWarning bool

Returns

  • bool

TryGetInterestingPositionAwayFromPoint(useSyncedRand, positionType, minDistFromSubs, position, awayPoint, minDistFromPoint, filter)

TryGetInterestingPositionAwayFromPoint

Parameters

  • useSyncedRand bool

  • positionType PositionType

  • minDistFromSubs number

  • position InterestingPosition&

  • awayPoint Microsoft.Xna.Framework.Vector2

  • minDistFromPoint number

  • filter function

Returns

  • bool

Update(deltaTime, cam)

Update

Parameters

  • deltaTime number

  • cam Camera

Fields

AbyssArea

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

  • AbyssArea

AbyssEnd

AbyssEnd, field of type number

  • AbyssEnd

AbyssIslands

AbyssIslands, field of type table

  • AbyssIslands

AbyssResources

AbyssResources, field of type table

  • AbyssResources

AbyssStart

AbyssStart, field of type number

  • AbyssStart

AiTarget

AiTarget, field of type AITarget

  • AiTarget

BackgroundColor

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

  • BackgroundColor

BackgroundCreatureManager

BackgroundCreatureManager, field of type BackgroundCreatureManager

  • BackgroundCreatureManager

BackgroundTextureColor

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

  • BackgroundTextureColor

BeaconStation

BeaconStation, field of type Submarine

  • BeaconStation

BottomBarrier

BottomBarrier, field of type FarseerPhysics.Dynamics.Body

  • BottomBarrier

BottomPos

BottomPos, field of type number

  • BottomPos

Caves

Caves, field of type table

  • Caves

CreationIndex

CreationIndex, field of type number

  • CreationIndex

CreationStackTrace

CreationStackTrace, field of type string

  • CreationStackTrace

CrushDepth

CrushDepth, field of type number

  • CrushDepth

Difficulty

Difficulty, field of type number

  • Difficulty

DrawPosition

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

  • DrawPosition

EndExitPosition

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

  • EndExitPosition

EndLocation

EndLocation, field of type Location

  • EndLocation

EndOutpost

EndOutpost, field of type Submarine

  • EndOutpost

EndPosition

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

  • EndPosition

EntitiesBeforeGenerate

EntitiesBeforeGenerate, field of type table

  • EntitiesBeforeGenerate

EntityCountAfterGenerate

EntityCountAfterGenerate, field of type number

  • EntityCountAfterGenerate

EntityCountBeforeGenerate

EntityCountBeforeGenerate, field of type number

  • EntityCountBeforeGenerate

EqualityCheckValues

EqualityCheckValues, field of type IReadOnlyDictionary

  • EqualityCheckValues

ErrorLine

ErrorLine, field of type string

  • ErrorLine

ExtraWalls

ExtraWalls, field of type table

  • ExtraWalls

Generating

Generating, field of type bool

  • Generating

GenerationParams

GenerationParams, field of type LevelGenerationParams

  • GenerationParams

ID

ID, field of type number

  • ID

IdFreed

IdFreed, field of type bool

  • IdFreed

InDetectable

InDetectable, field of type bool

  • InDetectable

IsEndBiome

IsEndBiome, field of type bool

  • IsEndBiome

Level.DefaultRealWorldCrushDepth

Level.DefaultRealWorldCrushDepth, field of type number

Level.ExitDistance

Level.ExitDistance, field of type number

Level.ForcedDifficulty

Level.ForcedDifficulty, field of type ?Single

Level.GridCellSize

Level.GridCellSize, field of type number

Level.IsLoadedFriendlyOutpost

Level.IsLoadedFriendlyOutpost, field of type bool

Level.IsLoadedOutpost

Level.IsLoadedOutpost, field of type bool

Level.Loaded

Level.Loaded, field of type Level

Level.MaxEntityDepth

Level.MaxEntityDepth, field of type number

Level.MaxSubmarineWidth

Level.MaxSubmarineWidth, field of type number

Level.OutsideBoundsCurrentHardLimit

Level.OutsideBoundsCurrentHardLimit, field of type number

Level.OutsideBoundsCurrentMargin

Level.OutsideBoundsCurrentMargin, field of type number

Level.OutsideBoundsCurrentMarginExponential

Level.OutsideBoundsCurrentMarginExponential, field of type number

Level.ShaftHeight

Level.ShaftHeight, field of type number

LevelData

LevelData, field of type LevelData

  • LevelData

LevelObjectManager

LevelObjectManager, field of type LevelObjectManager

  • LevelObjectManager

Mirrored

Mirrored, field of type bool

  • Mirrored

PathPoints

PathPoints, field of type table

  • PathPoints

Position

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

  • Position

PositionsOfInterest

PositionsOfInterest, field of type table

  • PositionsOfInterest

RealWorldCrushDepth

RealWorldCrushDepth, field of type number

  • RealWorldCrushDepth

Removed

Removed, field of type bool

  • Removed

Renderer

Renderer, field of type LevelRenderer

  • Renderer

Ruins

Ruins, field of type table

  • Ruins

SeaFloor

SeaFloor, field of type LevelWall

  • SeaFloor

SeaFloorTopPos

SeaFloorTopPos, field of type number

  • SeaFloorTopPos

Seed

Seed, field of type string

  • Seed

SimPosition

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

  • SimPosition

Size

Size, field of type Microsoft.Xna.Framework.Point

  • Size

SpawnTime

SpawnTime, field of type number

  • SpawnTime

StartExitPosition

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

  • StartExitPosition

StartLocation

StartLocation, field of type Location

  • StartLocation

StartOutpost

StartOutpost, field of type Submarine

  • StartOutpost

StartPosition

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

  • StartPosition

Submarine

Submarine, field of type Submarine

  • Submarine

TopBarrier

TopBarrier, field of type FarseerPhysics.Dynamics.Body

  • TopBarrier

Tunnels

Tunnels, field of type table

  • Tunnels

Type

Type, field of type LevelType

  • Type

UnsyncedExtraWalls

UnsyncedExtraWalls, field of type table

  • UnsyncedExtraWalls

WallColor

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

  • WallColor

WorldPosition

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

  • WorldPosition

Wrecks

Wrecks, field of type table

  • Wrecks

distanceField

distanceField, field of type table

  • distanceField

siteCoordsX

siteCoordsX, field of type table

  • siteCoordsX

siteCoordsY

siteCoordsY, field of type table

  • siteCoordsY