Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.StructurePrefab Class Reference
Inheritance diagram for Barotrauma.StructurePrefab:
Barotrauma.MapEntityPrefab Barotrauma.PrefabWithUintIdentifier Barotrauma.Prefab

Public Member Functions

 StructurePrefab (ContentXElement element, StructureFile file)
 
override void Dispose ()
 
- Public Member Functions inherited from Barotrauma.MapEntityPrefab
 MapEntityPrefab (ContentXElement element, ContentFile file)
 
string GetItemNameTextId ()
 
string GetHullNameTextId ()
 
IEnumerable< IdentifierGetAllowedUpgrades ()
 
bool HasSubCategory (string subcategory)
 
bool NameMatches (string name, StringComparison comparisonType)
 Check if the name or any of the aliases of this prefab match the given name.
 
bool NameMatches (IEnumerable< string > allowedNames, StringComparison comparisonType)
 
bool IsLinkAllowed (MapEntityPrefab target)
 
- Public Member Functions inherited from Barotrauma.Prefab
 Prefab (ContentFile file, Identifier identifier)
 
 Prefab (ContentFile file, ContentXElement element)
 
void Dispose ()
 

Public Attributes

readonly ContentXElement ConfigElement
 
readonly? bool IsHorizontal
 If null, the orientation is determined automatically based on the dimensions of the structure instances.
 
readonly Sprite BackgroundSprite
 
- Public Attributes inherited from Barotrauma.Prefab
readonly Identifier Identifier
 
readonly ContentFile ContentFile
 

Static Public Attributes

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

Protected Member Functions

override Identifier DetermineIdentifier (XElement element)
 
override void CreateInstance (Rectangle rect)
 
- Protected Member Functions inherited from Barotrauma.MapEntityPrefab
 MapEntityPrefab (Identifier identifier)
 
void CreateInstance (Rectangle rect)
 
void LoadDescription (ContentXElement element)
 
- Protected Member Functions inherited from Barotrauma.PrefabWithUintIdentifier
 PrefabWithUintIdentifier (ContentFile file, Identifier identifier)
 
 PrefabWithUintIdentifier (ContentFile file, ContentXElement element)
 
- Protected Member Functions inherited from Barotrauma.Prefab

Protected Attributes

Vector2 textureScale = Vector2.One
 

Properties

override LocalizedString Name [get]
 
override bool CanSpriteFlipX [get]
 
override bool CanSpriteFlipY [get]
 
Vector2 ScaledSize [get]
 
override Sprite Sprite [get]
 
override string OriginalName [get]
 
override ImmutableHashSet< IdentifierTags [get]
 
override ImmutableHashSet< IdentifierAllowedLinks [get]
 
override MapEntityCategory Category [get]
 
override ImmutableHashSet< string > Aliases [get]
 
bool Body [get]
 
float BodyRotation [get]
 
float BodyWidth [get]
 
float BodyHeight [get]
 
Vector2 BodyOffset [get]
 
bool Platform [get]
 
bool AllowAttachItems [get]
 
bool AllowRotatingInEditor [get, set]
 
float MinHealth [get]
 
float Health [get]
 
bool IndestructibleInOutposts [get]
 
bool CastShadow [get]
 
Direction StairDirection [get]
 
float StairAngle [get]
 
bool NoAITarget [get]
 
Vector2 Size [get]
 
string DamageSound [get]
 
string DamageParticle [get]
 
Vector2 TextureScale [get]
 
- Properties inherited from Barotrauma.MapEntityPrefab
static IEnumerable< MapEntityPrefabList [get]
 
static MapEntityPrefab Selected [get, set]
 
Sprite Sprite [get]
 
virtual bool CanSpriteFlipX = false [get]
 
virtual bool CanSpriteFlipY = false [get]
 
string OriginalName [get]
 
LocalizedString Name [get]
 
ImmutableHashSet< IdentifierTags [get]
 
ImmutableHashSet< IdentifierAllowedLinks [get]
 Links defined to identifiers.
 
MapEntityCategory Category [get]
 
ImmutableHashSet< string > Aliases [get]
 
bool ResizeHorizontal [get, protected set]
 
bool ResizeVertical [get, protected set]
 
LocalizedString Description [get, protected set]
 
string AllowedUpgrades [get, protected set]
 
bool HideInMenus [get, protected set]
 
bool HideInEditors [get, protected set]
 
string Subcategory [get, protected set]
 
bool Linkable [get, protected set]
 
Color SpriteColor [get, protected set]
 
float Scale [get, protected set]
 
- Properties inherited from Barotrauma.PrefabWithUintIdentifier
UInt32 UintIdentifier [get, set]
 
- Properties inherited from Barotrauma.Prefab
ContentPackageContentPackage [get]
 
ContentPath FilePath [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Barotrauma.MapEntityPrefab
static bool SelectPrefab (object selection)
 
static object GetSelected ()
 
static MapEntityPrefab Find (string name, string identifier=null, bool showErrorMessages=true)
 Find a matching map entity prefab.
 
static MapEntityPrefab Find (string name, Identifier identifier, bool showErrorMessages=true)
 
static MapEntityPrefab GetRandom (Predicate< MapEntityPrefab > predicate, Rand.RandSync sync)
 
static MapEntityPrefab Find (Predicate< MapEntityPrefab > predicate)
 Find a matching map entity prefab.
 
static MapEntityPrefab FindByName (string name)
 
static MapEntityPrefab FindByIdentifier (Identifier identifier)
 
- Static Public Member Functions inherited from Barotrauma.Prefab
static void DisallowCallFromConstructor ()
 
- Static Protected Attributes inherited from Barotrauma.MapEntityPrefab
static Vector2 placePosition
 

Constructor & Destructor Documentation

◆ StructurePrefab()

Barotrauma.StructurePrefab.StructurePrefab ( ContentXElement element,
StructureFile file )

Member Function Documentation

◆ CreateInstance()

override void Barotrauma.StructurePrefab.CreateInstance ( Rectangle rect)
protected

◆ DetermineIdentifier()

override Identifier Barotrauma.StructurePrefab.DetermineIdentifier ( XElement element)
protectedvirtual

Reimplemented from Barotrauma.Prefab.

◆ Dispose()

override void Barotrauma.StructurePrefab.Dispose ( )

Member Data Documentation

◆ BackgroundSprite

readonly Sprite Barotrauma.StructurePrefab.BackgroundSprite

◆ ConfigElement

readonly ContentXElement Barotrauma.StructurePrefab.ConfigElement

◆ IsHorizontal

readonly? bool Barotrauma.StructurePrefab.IsHorizontal

If null, the orientation is determined automatically based on the dimensions of the structure instances.

◆ Prefabs

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

◆ textureScale

Vector2 Barotrauma.StructurePrefab.textureScale = Vector2.One
protected

Property Documentation

◆ Aliases

override ImmutableHashSet<string> Barotrauma.StructurePrefab.Aliases
get

◆ AllowAttachItems

bool Barotrauma.StructurePrefab.AllowAttachItems
get

◆ AllowedLinks

override ImmutableHashSet<Identifier> Barotrauma.StructurePrefab.AllowedLinks
get

◆ AllowRotatingInEditor

bool Barotrauma.StructurePrefab.AllowRotatingInEditor
getset

◆ Body

bool Barotrauma.StructurePrefab.Body
get

◆ BodyHeight

float Barotrauma.StructurePrefab.BodyHeight
get

◆ BodyOffset

Vector2 Barotrauma.StructurePrefab.BodyOffset
get

◆ BodyRotation

float Barotrauma.StructurePrefab.BodyRotation
get

◆ BodyWidth

float Barotrauma.StructurePrefab.BodyWidth
get

◆ CanSpriteFlipX

override bool Barotrauma.StructurePrefab.CanSpriteFlipX
get

◆ CanSpriteFlipY

override bool Barotrauma.StructurePrefab.CanSpriteFlipY
get

◆ CastShadow

bool Barotrauma.StructurePrefab.CastShadow
get

◆ Category

override MapEntityCategory Barotrauma.StructurePrefab.Category
get

◆ DamageParticle

string Barotrauma.StructurePrefab.DamageParticle
get

◆ DamageSound

string Barotrauma.StructurePrefab.DamageSound
get

◆ Health

float Barotrauma.StructurePrefab.Health
get

◆ IndestructibleInOutposts

bool Barotrauma.StructurePrefab.IndestructibleInOutposts
get

◆ MinHealth

float Barotrauma.StructurePrefab.MinHealth
get

◆ Name

override LocalizedString Barotrauma.StructurePrefab.Name
get

◆ NoAITarget

bool Barotrauma.StructurePrefab.NoAITarget
get

◆ OriginalName

override string Barotrauma.StructurePrefab.OriginalName
get

◆ Platform

bool Barotrauma.StructurePrefab.Platform
get

◆ ScaledSize

Vector2 Barotrauma.StructurePrefab.ScaledSize
get

◆ Size

Vector2 Barotrauma.StructurePrefab.Size
get

◆ Sprite

override Sprite Barotrauma.StructurePrefab.Sprite
get

◆ StairAngle

float Barotrauma.StructurePrefab.StairAngle
get

◆ StairDirection

Direction Barotrauma.StructurePrefab.StairDirection
get

◆ Tags

override ImmutableHashSet<Identifier> Barotrauma.StructurePrefab.Tags
get

◆ TextureScale

Vector2 Barotrauma.StructurePrefab.TextureScale
get

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