Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.HumanPrefab Class Reference
Inheritance diagram for Barotrauma.HumanPrefab:
Barotrauma.PrefabWithUintIdentifier Barotrauma.Prefab Barotrauma.CorpsePrefab

Public Member Functions

 HumanPrefab (ContentXElement element, ContentFile file, Identifier npcSetIdentifier)
 
IEnumerable< IdentifierGetTags ()
 
IEnumerable< IdentifierGetModuleFlags ()
 
IEnumerable< IdentifierGetSpawnPointTags ()
 
JobPrefab GetJobPrefab (Rand.RandSync randSync=Rand.RandSync.Unsynced, Func< JobPrefab, bool > predicate=null)
 
void InitializeCharacter (Character npc, ISpatialEntity positionToStayIn=null)
 
bool GiveItems (Character character, Submarine submarine, WayPoint spawnPoint, Rand.RandSync randSync=Rand.RandSync.Unsynced, bool createNetworkEvents=true)
 
CharacterInfo CreateCharacterInfo (Rand.RandSync randSync=Rand.RandSync.Unsynced)
 Creates a character info from the human prefab. If there are custom character infos defined, those are used, otherwise a randomized info is generated.
 
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 void InitializeItem (Character character, ContentXElement itemElement, Submarine submarine, HumanPrefab humanPrefab, WayPoint spawnPoint=null, Item parentItem=null, bool createNetworkEvents=true)
 
- Static Public Member Functions inherited from Barotrauma.Prefab
static void DisallowCallFromConstructor ()
 

Public Attributes

readonly List<(ContentXElement element, float commonness)> ItemSets = new List<(ContentXElement element, float commonness)>()
 
readonly List<(ContentXElement element, float commonness)> CustomCharacterInfos = new List<(ContentXElement element, float commonness)>()
 
readonly Identifier NpcSetIdentifier
 
- Public Attributes inherited from Barotrauma.Prefab
readonly Identifier Identifier
 
readonly ContentFile ContentFile
 

Properties

Identifier Job [get, protected set]
 
float Commonness [get, protected set]
 
float HealthMultiplier [get, protected set]
 
float HealthMultiplierInMultiplayer [get, protected set]
 
float AimSpeed [get, protected set]
 
float AimAccuracy [get, protected set]
 
float SkillMultiplier [get, protected set]
 
int ExperiencePoints [get]
 
string Tags [get, set]
 
string ModuleFlags [get, set]
 
string SpawnPointTags [get, set]
 
CampaignMode.InteractionType CampaignInteractionType [get, protected set]
 
AIObjectiveIdle.BehaviorType Behavior [get, protected set]
 
float Hearing = 1.0f [get, set]
 
float ReportRange [get, protected set]
 
float FindWeaponsRange [get, protected set]
 
Identifier[] PreferredOutpostModuleTypes [get, protected set]
 
Identifier Faction [get, set]
 
Identifier Group [get, set]
 
bool AllowDraggingIndefinitely [get, set]
 
XElement Element [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 Attributes inherited from Barotrauma.Prefab
static readonly ImmutableHashSet< Type > Types
 
- 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)
 

Constructor & Destructor Documentation

◆ HumanPrefab()

Barotrauma.HumanPrefab.HumanPrefab ( ContentXElement element,
ContentFile file,
Identifier npcSetIdentifier )

Member Function Documentation

◆ CreateCharacterInfo()

CharacterInfo Barotrauma.HumanPrefab.CreateCharacterInfo ( Rand.RandSync randSync = Rand::RandSync::Unsynced)

Creates a character info from the human prefab. If there are custom character infos defined, those are used, otherwise a randomized info is generated.

Parameters
randSync
Returns

◆ Dispose()

override void Barotrauma.HumanPrefab.Dispose ( )

◆ GetJobPrefab()

JobPrefab Barotrauma.HumanPrefab.GetJobPrefab ( Rand.RandSync randSync = Rand::RandSync::Unsynced,
Func< JobPrefab, bool > predicate = null )

◆ GetModuleFlags()

IEnumerable< Identifier > Barotrauma.HumanPrefab.GetModuleFlags ( )

◆ GetSpawnPointTags()

IEnumerable< Identifier > Barotrauma.HumanPrefab.GetSpawnPointTags ( )

◆ GetTags()

IEnumerable< Identifier > Barotrauma.HumanPrefab.GetTags ( )

◆ GiveItems()

bool Barotrauma.HumanPrefab.GiveItems ( Character character,
Submarine submarine,
WayPoint spawnPoint,
Rand.RandSync randSync = Rand::RandSync::Unsynced,
bool createNetworkEvents = true )

◆ InitializeCharacter()

void Barotrauma.HumanPrefab.InitializeCharacter ( Character npc,
ISpatialEntity positionToStayIn = null )

◆ InitializeItem()

static void Barotrauma.HumanPrefab.InitializeItem ( Character character,
ContentXElement itemElement,
Submarine submarine,
HumanPrefab humanPrefab,
WayPoint spawnPoint = null,
Item parentItem = null,
bool createNetworkEvents = true )
static

Member Data Documentation

◆ CustomCharacterInfos

readonly List<(ContentXElement element, float commonness)> Barotrauma.HumanPrefab.CustomCharacterInfos = new List<(ContentXElement element, float commonness)>()

◆ ItemSets

readonly List<(ContentXElement element, float commonness)> Barotrauma.HumanPrefab.ItemSets = new List<(ContentXElement element, float commonness)>()

◆ NpcSetIdentifier

readonly Identifier Barotrauma.HumanPrefab.NpcSetIdentifier

Property Documentation

◆ AimAccuracy

float Barotrauma.HumanPrefab.AimAccuracy
getprotected set

◆ AimSpeed

float Barotrauma.HumanPrefab.AimSpeed
getprotected set

◆ AllowDraggingIndefinitely

bool Barotrauma.HumanPrefab.AllowDraggingIndefinitely
getset

◆ Behavior

AIObjectiveIdle.BehaviorType Barotrauma.HumanPrefab.Behavior
getprotected set

◆ CampaignInteractionType

CampaignMode.InteractionType Barotrauma.HumanPrefab.CampaignInteractionType
getprotected set

◆ Commonness

float Barotrauma.HumanPrefab.Commonness
getprotected set

◆ Element

XElement Barotrauma.HumanPrefab.Element
getprotected set

◆ ExperiencePoints

int Barotrauma.HumanPrefab.ExperiencePoints
get

◆ Faction

Identifier Barotrauma.HumanPrefab.Faction
getset

◆ FindWeaponsRange

float Barotrauma.HumanPrefab.FindWeaponsRange
getprotected set

◆ Group

Identifier Barotrauma.HumanPrefab.Group
getset

◆ HealthMultiplier

float Barotrauma.HumanPrefab.HealthMultiplier
getprotected set

◆ HealthMultiplierInMultiplayer

float Barotrauma.HumanPrefab.HealthMultiplierInMultiplayer
getprotected set

◆ Hearing

float Barotrauma.HumanPrefab.Hearing = 1.0f
getset

◆ Job

Identifier Barotrauma.HumanPrefab.Job
getprotected set

◆ ModuleFlags

string Barotrauma.HumanPrefab.ModuleFlags
getset

◆ PreferredOutpostModuleTypes

Identifier [] Barotrauma.HumanPrefab.PreferredOutpostModuleTypes
getprotected set

◆ ReportRange

float Barotrauma.HumanPrefab.ReportRange
getprotected set

◆ SkillMultiplier

float Barotrauma.HumanPrefab.SkillMultiplier
getprotected set

◆ SpawnPointTags

string Barotrauma.HumanPrefab.SpawnPointTags
getset

◆ Tags

string Barotrauma.HumanPrefab.Tags
getset

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