Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.MapEntityPrefab Class Referenceabstract
Inheritance diagram for Barotrauma.MapEntityPrefab:
Barotrauma.PrefabWithUintIdentifier Barotrauma.Prefab Barotrauma.CoreEntityPrefab Barotrauma.ItemAssemblyPrefab Barotrauma.ItemPrefab Barotrauma.LinkedSubmarinePrefab Barotrauma.StructurePrefab

Public Member Functions

 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 ()
 

Static Public Member Functions

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 ()
 

Protected Member Functions

 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
virtual Identifier DetermineIdentifier (XElement element)
 

Static Protected Attributes

static Vector2 placePosition
 

Properties

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

- Public Attributes inherited from Barotrauma.Prefab
readonly Identifier Identifier
 
readonly ContentFile ContentFile
 
- Static Public Attributes inherited from Barotrauma.Prefab
static readonly ImmutableHashSet< Type > Types
 

Constructor & Destructor Documentation

◆ MapEntityPrefab() [1/2]

Barotrauma.MapEntityPrefab.MapEntityPrefab ( Identifier identifier)
protected

◆ MapEntityPrefab() [2/2]

Barotrauma.MapEntityPrefab.MapEntityPrefab ( ContentXElement element,
ContentFile file )

Member Function Documentation

◆ CreateInstance()

void Barotrauma.MapEntityPrefab.CreateInstance ( Rectangle rect)
abstractprotected

◆ Find() [1/3]

static MapEntityPrefab Barotrauma.MapEntityPrefab.Find ( Predicate< MapEntityPrefab > predicate)
static

Find a matching map entity prefab.

Parameters
predicateA predicate that returns true on the desired prefab.

◆ Find() [2/3]

static MapEntityPrefab Barotrauma.MapEntityPrefab.Find ( string name,
Identifier identifier,
bool showErrorMessages = true )
static

◆ Find() [3/3]

static MapEntityPrefab Barotrauma.MapEntityPrefab.Find ( string name,
string identifier = null,
bool showErrorMessages = true )
static

Find a matching map entity prefab.

Parameters
nameThe name of the item (can be omitted when searching based on identifier)
identifierThe identifier of the item (if null, the identifier is ignored and the search is done only based on the name)

◆ FindByIdentifier()

static MapEntityPrefab Barotrauma.MapEntityPrefab.FindByIdentifier ( Identifier identifier)
static

◆ FindByName()

static MapEntityPrefab Barotrauma.MapEntityPrefab.FindByName ( string name)
static

◆ GetAllowedUpgrades()

IEnumerable< Identifier > Barotrauma.MapEntityPrefab.GetAllowedUpgrades ( )

◆ GetHullNameTextId()

string Barotrauma.MapEntityPrefab.GetHullNameTextId ( )

◆ GetItemNameTextId()

string Barotrauma.MapEntityPrefab.GetItemNameTextId ( )

◆ GetRandom()

static MapEntityPrefab Barotrauma.MapEntityPrefab.GetRandom ( Predicate< MapEntityPrefab > predicate,
Rand.RandSync sync )
static

◆ GetSelected()

static object Barotrauma.MapEntityPrefab.GetSelected ( )
static

◆ HasSubCategory()

bool Barotrauma.MapEntityPrefab.HasSubCategory ( string subcategory)

◆ IsLinkAllowed()

bool Barotrauma.MapEntityPrefab.IsLinkAllowed ( MapEntityPrefab target)

◆ LoadDescription()

void Barotrauma.MapEntityPrefab.LoadDescription ( ContentXElement element)
protected

◆ NameMatches() [1/2]

bool Barotrauma.MapEntityPrefab.NameMatches ( IEnumerable< string > allowedNames,
StringComparison comparisonType )

◆ NameMatches() [2/2]

bool Barotrauma.MapEntityPrefab.NameMatches ( string name,
StringComparison comparisonType )

Check if the name or any of the aliases of this prefab match the given name.

◆ SelectPrefab()

static bool Barotrauma.MapEntityPrefab.SelectPrefab ( object selection)
static

Member Data Documentation

◆ placePosition

Vector2 Barotrauma.MapEntityPrefab.placePosition
staticprotected

Property Documentation

◆ Aliases

ImmutableHashSet<string> Barotrauma.MapEntityPrefab.Aliases
getabstract

◆ AllowedLinks

ImmutableHashSet<Identifier> Barotrauma.MapEntityPrefab.AllowedLinks
getabstract

Links defined to identifiers.

◆ AllowedUpgrades

string Barotrauma.MapEntityPrefab.AllowedUpgrades
getprotected set

◆ CanSpriteFlipX

virtual bool Barotrauma.MapEntityPrefab.CanSpriteFlipX = false
get

◆ CanSpriteFlipY

virtual bool Barotrauma.MapEntityPrefab.CanSpriteFlipY = false
get

◆ Category

MapEntityCategory Barotrauma.MapEntityPrefab.Category
getabstract

◆ Description

LocalizedString Barotrauma.MapEntityPrefab.Description
getprotected set

◆ HideInEditors

bool Barotrauma.MapEntityPrefab.HideInEditors
getprotected set

◆ HideInMenus

bool Barotrauma.MapEntityPrefab.HideInMenus
getprotected set

◆ Linkable

bool Barotrauma.MapEntityPrefab.Linkable
getprotected set

◆ List

IEnumerable<MapEntityPrefab> Barotrauma.MapEntityPrefab.List
staticget

◆ Name

LocalizedString Barotrauma.MapEntityPrefab.Name
getabstract

◆ OriginalName

string Barotrauma.MapEntityPrefab.OriginalName
getabstract

◆ ResizeHorizontal

bool Barotrauma.MapEntityPrefab.ResizeHorizontal
getprotected set

◆ ResizeVertical

bool Barotrauma.MapEntityPrefab.ResizeVertical
getprotected set

◆ Scale

float Barotrauma.MapEntityPrefab.Scale
getprotected set

◆ Selected

MapEntityPrefab Barotrauma.MapEntityPrefab.Selected
staticgetset

◆ Sprite

Sprite Barotrauma.MapEntityPrefab.Sprite
getabstract

◆ SpriteColor

Color Barotrauma.MapEntityPrefab.SpriteColor
getprotected set

◆ Subcategory

string Barotrauma.MapEntityPrefab.Subcategory
getprotected set

◆ Tags

ImmutableHashSet<Identifier> Barotrauma.MapEntityPrefab.Tags
getabstract

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