Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.LevelObjectPrefab Class Reference
Inheritance diagram for Barotrauma.LevelObjectPrefab:
Barotrauma.PrefabWithUintIdentifier Barotrauma.ISerializableEntity Barotrauma.Prefab

Classes

class  ChildObject
 

Public Types

enum  SpawnPosType {
  None = 0 , MainPathWall = 1 , SidePathWall = 2 , CaveWall = 4 ,
  NestWall = 8 , RuinWall = 16 , SeaFloor = 32 , MainPath = 64 ,
  LevelStart = 128 , LevelEnd = 256 , OutpostWall = 512 , Wall = MainPathWall | SidePathWall | CaveWall
}
 

Public Member Functions

override string ToString ()
 
 LevelObjectPrefab (ContentXElement element, LevelObjectPrefabsFile file, Identifier identifierOverride=default)
 
float GetCommonness (CaveGenerationParams generationParams, bool requireCaveSpecificOverride=true)
 
float GetCommonness (LevelData levelData)
 
override void Dispose ()
 
- Public Member Functions inherited from Barotrauma.Prefab
 Prefab (ContentFile file, Identifier identifier)
 
 Prefab (ContentFile file, ContentXElement element)
 
void Dispose ()
 

Static Public Member Functions

static Identifier ParseIdentifier (Identifier identifierOverride, XElement element)
 
- Static Public Member Functions inherited from Barotrauma.Prefab
static void DisallowCallFromConstructor ()
 

Public Attributes

readonly List< ContentXElementLevelTriggerElements
 
readonly Dictionary< Identifier, float > OverrideCommonness
 Overrides the commonness of the object in a specific level type. Key = name of the level type, value = commonness in that level type.
 
- Public Attributes inherited from Barotrauma.Prefab
readonly Identifier Identifier
 
readonly ContentFile ContentFile
 

Static Public Attributes

static readonly PrefabCollection< LevelObjectPrefabPrefabs = new PrefabCollection<LevelObjectPrefab>()
 
- Static Public Attributes inherited from Barotrauma.Prefab
static readonly ImmutableHashSet< Type > Types
 

Properties

List< SpriteSprites = new List<Sprite>() [get]
 
DeformableSprite DeformableSprite [get]
 
float MinSize [get]
 
float MaxSize [get]
 
Alignment Alignment [get]
 Which sides of a wall the object can appear on.
 
SpawnPosType SpawnPos [get]
 
XElement Config [get]
 
XElement PhysicsBodyElement [get]
 
int PhysicsBodyTriggerIndex = -1 [get]
 
Dictionary< Sprite, XElement > SpriteSpecificPhysicsBodyElements = new Dictionary<Sprite, XElement>() [get]
 
int MaxCount [get]
 
Vector2 DepthRange [get]
 
float ClusteringAmount [get]
 The tendency for the prefab to form clusters. Used as an exponent for perlin noise values that are used to determine the probability for an object to spawn at a specific position.
 
float ClusteringGroup [get]
 A value between 0-1 that determines the z-coordinate to sample perlin noise from when determining the probability for an object to spawn at a specific position. Using the same (or close) value for different objects means the objects tend to form clusters in the same areas.
 
Vector2 RandomOffset [get]
 
bool AlignWithSurface [get]
 
bool AllowAtStart [get]
 
bool AllowAtEnd [get]
 
float MinSurfaceWidth [get]
 Minimum length of a graph edge the object can spawn on.
 
Vector2 RandomRotation [get]
 
Vector2 RandomRotationRad [get]
 
float SwingAmount [get]
 
float SwingAmountRad [get]
 
float SwingFrequency [get]
 
Vector2 ScaleOscillation [get]
 
float ScaleOscillationFrequency [get]
 
float Commonness [get]
 
float SonarDisruption [get]
 
bool TakeLevelWallDamage [get]
 
bool HideWhenBroken [get]
 
float Health [get]
 
Color SpriteColor [get]
 
string Name [get]
 
List< ChildObjectChildObjects [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 
List< LevelObjectPrefabOverrideProperties [get]
 A list of prefabs whose properties override this one's properties when a trigger is active. E.g. if a trigger in the index 1 of the trigger list is active, the properties in index 1 in this list are used (unless it's null)
 
- Properties inherited from Barotrauma.PrefabWithUintIdentifier
UInt32 UintIdentifier [get, set]
 
- Properties inherited from Barotrauma.Prefab
ContentPackageContentPackage [get]
 
ContentPath FilePath [get]
 
- Properties inherited from Barotrauma.ISerializableEntity

Additional Inherited Members

- Protected Member Functions inherited from Barotrauma.PrefabWithUintIdentifier
 PrefabWithUintIdentifier (ContentFile file, Identifier identifier)
 
 PrefabWithUintIdentifier (ContentFile file, ContentXElement element)
 
- Protected Member Functions inherited from Barotrauma.Prefab
virtual Identifier DetermineIdentifier (XElement element)
 

Member Enumeration Documentation

◆ SpawnPosType

Enumerator
None 
MainPathWall 
SidePathWall 
CaveWall 
NestWall 
RuinWall 
SeaFloor 
MainPath 
LevelStart 
LevelEnd 
OutpostWall 
Wall 

Constructor & Destructor Documentation

◆ LevelObjectPrefab()

Barotrauma.LevelObjectPrefab.LevelObjectPrefab ( ContentXElement element,
LevelObjectPrefabsFile file,
Identifier identifierOverride = default )

Member Function Documentation

◆ Dispose()

override void Barotrauma.LevelObjectPrefab.Dispose ( )

◆ GetCommonness() [1/2]

float Barotrauma.LevelObjectPrefab.GetCommonness ( CaveGenerationParams generationParams,
bool requireCaveSpecificOverride = true )

◆ GetCommonness() [2/2]

float Barotrauma.LevelObjectPrefab.GetCommonness ( LevelData levelData)

◆ ParseIdentifier()

static Identifier Barotrauma.LevelObjectPrefab.ParseIdentifier ( Identifier identifierOverride,
XElement element )
static

◆ ToString()

override string Barotrauma.LevelObjectPrefab.ToString ( )

Member Data Documentation

◆ LevelTriggerElements

readonly List<ContentXElement> Barotrauma.LevelObjectPrefab.LevelTriggerElements

◆ OverrideCommonness

readonly Dictionary<Identifier, float> Barotrauma.LevelObjectPrefab.OverrideCommonness

Overrides the commonness of the object in a specific level type. Key = name of the level type, value = commonness in that level type.

◆ Prefabs

readonly PrefabCollection<LevelObjectPrefab> Barotrauma.LevelObjectPrefab.Prefabs = new PrefabCollection<LevelObjectPrefab>()
static

Property Documentation

◆ Alignment

Alignment Barotrauma.LevelObjectPrefab.Alignment
get

Which sides of a wall the object can appear on.

◆ AlignWithSurface

bool Barotrauma.LevelObjectPrefab.AlignWithSurface
get

◆ AllowAtEnd

bool Barotrauma.LevelObjectPrefab.AllowAtEnd
get

◆ AllowAtStart

bool Barotrauma.LevelObjectPrefab.AllowAtStart
get

◆ ChildObjects

List<ChildObject> Barotrauma.LevelObjectPrefab.ChildObjects
get

◆ ClusteringAmount

float Barotrauma.LevelObjectPrefab.ClusteringAmount
get

The tendency for the prefab to form clusters. Used as an exponent for perlin noise values that are used to determine the probability for an object to spawn at a specific position.

◆ ClusteringGroup

float Barotrauma.LevelObjectPrefab.ClusteringGroup
get

A value between 0-1 that determines the z-coordinate to sample perlin noise from when determining the probability for an object to spawn at a specific position. Using the same (or close) value for different objects means the objects tend to form clusters in the same areas.

◆ Commonness

float Barotrauma.LevelObjectPrefab.Commonness
get

◆ Config

XElement Barotrauma.LevelObjectPrefab.Config
get

◆ DeformableSprite

DeformableSprite Barotrauma.LevelObjectPrefab.DeformableSprite
get

◆ DepthRange

Vector2 Barotrauma.LevelObjectPrefab.DepthRange
get

◆ Health

float Barotrauma.LevelObjectPrefab.Health
get

◆ HideWhenBroken

bool Barotrauma.LevelObjectPrefab.HideWhenBroken
get

◆ MaxCount

int Barotrauma.LevelObjectPrefab.MaxCount
get

◆ MaxSize

float Barotrauma.LevelObjectPrefab.MaxSize
get

◆ MinSize

float Barotrauma.LevelObjectPrefab.MinSize
get

◆ MinSurfaceWidth

float Barotrauma.LevelObjectPrefab.MinSurfaceWidth
get

Minimum length of a graph edge the object can spawn on.

◆ Name

string Barotrauma.LevelObjectPrefab.Name
get

◆ OverrideProperties

List<LevelObjectPrefab> Barotrauma.LevelObjectPrefab.OverrideProperties
get

A list of prefabs whose properties override this one's properties when a trigger is active. E.g. if a trigger in the index 1 of the trigger list is active, the properties in index 1 in this list are used (unless it's null)

◆ PhysicsBodyElement

XElement Barotrauma.LevelObjectPrefab.PhysicsBodyElement
get

◆ PhysicsBodyTriggerIndex

int Barotrauma.LevelObjectPrefab.PhysicsBodyTriggerIndex = -1
get

◆ RandomOffset

Vector2 Barotrauma.LevelObjectPrefab.RandomOffset
get

◆ RandomRotation

Vector2 Barotrauma.LevelObjectPrefab.RandomRotation
get

◆ RandomRotationRad

Vector2 Barotrauma.LevelObjectPrefab.RandomRotationRad
get

◆ ScaleOscillation

Vector2 Barotrauma.LevelObjectPrefab.ScaleOscillation
get

◆ ScaleOscillationFrequency

float Barotrauma.LevelObjectPrefab.ScaleOscillationFrequency
get

◆ SerializableProperties

Dictionary<Identifier, SerializableProperty> Barotrauma.LevelObjectPrefab.SerializableProperties
get

◆ SonarDisruption

float Barotrauma.LevelObjectPrefab.SonarDisruption
get

◆ SpawnPos

SpawnPosType Barotrauma.LevelObjectPrefab.SpawnPos
get

◆ SpriteColor

Color Barotrauma.LevelObjectPrefab.SpriteColor
get

◆ Sprites

List<Sprite> Barotrauma.LevelObjectPrefab.Sprites = new List<Sprite>()
get

◆ SpriteSpecificPhysicsBodyElements

Dictionary<Sprite, XElement> Barotrauma.LevelObjectPrefab.SpriteSpecificPhysicsBodyElements = new Dictionary<Sprite, XElement>()
get

◆ SwingAmount

float Barotrauma.LevelObjectPrefab.SwingAmount
get

◆ SwingAmountRad

float Barotrauma.LevelObjectPrefab.SwingAmountRad
get

◆ SwingFrequency

float Barotrauma.LevelObjectPrefab.SwingFrequency
get

◆ TakeLevelWallDamage

bool Barotrauma.LevelObjectPrefab.TakeLevelWallDamage
get

The documentation for this class was generated from the following file: