Barotrauma Client Doc
Barotrauma.RagdollParams Class Reference
Inheritance diagram for Barotrauma.RagdollParams:
Barotrauma.EditableParams Barotrauma.IMemorizable< RagdollParams > Barotrauma.ISerializableEntity Barotrauma.FishRagdollParams Barotrauma.HumanRagdollParams

Classes

class  AttackParams
 
class  ColliderParams
 
class  DamageModifierParams
 
class  DecorativeSpriteParams
 
class  DeformationParams
 
class  DeformSpriteParams
 
class  JointParams
 
class  LightSourceParams
 
class  LimbParams
 
class  SoundParams
 
class  SpriteParams
 
class  SubParam
 

Public Member Functions

bool Save (string fileNameWithoutExtension=null)
 
void Apply ()
 Applies the current properties to the xml definition without saving to file. More...
 
override bool Reset (bool forceReload=false)
 Resets the current properties to the xml (stored in memory). Force reload reloads the file from disk. More...
 
bool Deserialize (XElement element=null, bool alsoChildren=true, bool recursive=true)
 
bool Serialize (XElement element=null, bool alsoChildren=true, bool recursive=true)
 
void AddToEditor (ParamsEditor editor, bool alsoChildren=true, int space=0)
 
void ApplyVariantScale (XDocument variantFile)
 
void StoreSnapshot ()
 
void Undo ()
 
void Redo ()
 
void ClearHistory ()
 
- Public Member Functions inherited from Barotrauma.EditableParams
virtual bool Save (string fileNameWithoutExtension=null, System.Xml.XmlWriterSettings settings=null)
 
virtual void AddToEditor (ParamsEditor editor, int space=0)
 
- Public Member Functions inherited from Barotrauma.IMemorizable< RagdollParams >
void StoreSnapshot ()
 
void Undo ()
 
void Redo ()
 
void ClearHistory ()
 

Static Public Member Functions

static string GetDefaultFileName (Identifier speciesName)
 
static string GetDefaultFile (Identifier speciesName, ContentPackage contentPackage=null)
 
static string GetFolder (Identifier speciesName, ContentPackage contentPackage=null)
 
static T GetDefaultRagdollParams< T > (Identifier speciesName)
 
static T GetRagdollParams< T > (Identifier speciesName, string fileName=null)
 If the file name is left null, default file is selected. If fails, will select the default file. Note: Use the filename without the extensions, don't use the full path! If a custom folder is used, it's defined in the character info file. More...
 
static T CreateDefault< T > (string fullPath, Identifier speciesName, XElement mainElement)
 Creates a default ragdoll for the species using a predefined configuration. Note: Use only to create ragdolls for new characters, because this overrides the old ragdoll! More...
 
static void ClearCache ()
 

Static Public Attributes

const float MIN_SCALE = 0.1f
 
const float MAX_SCALE = 2
 

Protected Member Functions

IEnumerable< SubParamGetAllSubParams ()
 
override void UpdatePath (ContentPath fullPath)
 
bool Load (ContentPath file, Identifier speciesName)
 
void CreateColliders ()
 
void CreateLimbs ()
 
void CreateJoints ()
 
- Protected Member Functions inherited from Barotrauma.EditableParams
ContentXElement CreateElement (string name, params object[] attrs)
 
virtual string GetName ()
 
virtual bool Deserialize (XElement element=null)
 
virtual bool Serialize (XElement element=null)
 
virtual bool Load (ContentPath file)
 

Properties

Identifier SpeciesName [get]
 
string Texture [get, set]
 
Color Color [get, set]
 
float SpritesheetOrientation [get, set]
 
bool IsSpritesheetOrientationHorizontal [get]
 
float LimbScale [get, set]
 
float JointScale [get, set]
 
float TextureScale [get, set]
 
float ColliderHeightFromFloor [get, set]
 
float ImpactTolerance [get, set]
 
bool CanEnterSubmarine [get, set]
 
bool CanWalk [get, set]
 
bool Draggable [get, set]
 
LimbType MainLimb [get, set]
 
List< ColliderParamsColliders = new List<ColliderParams>() [get]
 
List< LimbParamsLimbs = new List<LimbParams>() [get]
 
List< JointParamsJoints = new List<JointParams>() [get]
 
Memento< RagdollParamsMemento = new Memento<RagdollParams>() [get, protected set]
 
- Properties inherited from Barotrauma.EditableParams
bool IsLoaded [get, protected set]
 
string Name [get]
 
string FileName [get]
 
string Folder [get]
 
ContentPath Path = ContentPath.Empty [get, protected set]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get, protected set]
 
virtual ContentXElementMainElement [get]
 
ContentXElement OriginalElement [get, protected set]
 
SerializableEntityEditor SerializableEntityEditor [get, protected set]
 
- Properties inherited from Barotrauma.ISerializableEntity
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 
- Properties inherited from Barotrauma.IMemorizable< RagdollParams >
Memento< T > Memento [get]
 

Additional Inherited Members

- Protected Attributes inherited from Barotrauma.EditableParams
ContentXElement rootElement
 
XDocument doc
 

Detailed Description

Definition at line 27 of file RagdollParams.cs.

Member Function Documentation

◆ AddToEditor()

void Barotrauma.RagdollParams.AddToEditor ( ParamsEditor  editor,
bool  alsoChildren = true,
int  space = 0 
)

Definition at line 380 of file RagdollParams.cs.

◆ Apply()

void Barotrauma.RagdollParams.Apply ( )

Applies the current properties to the xml definition without saving to file.

Definition at line 297 of file RagdollParams.cs.

◆ ApplyVariantScale()

void Barotrauma.RagdollParams.ApplyVariantScale ( XDocument  variantFile)

Definition at line 402 of file RagdollParams.cs.

◆ ClearCache()

static void Barotrauma.RagdollParams.ClearCache ( )
static

◆ ClearHistory()

void Barotrauma.RagdollParams.ClearHistory ( )

◆ CreateColliders()

void Barotrauma.RagdollParams.CreateColliders ( )
protected

Definition at line 317 of file RagdollParams.cs.

◆ CreateDefault< T >()

static T Barotrauma.RagdollParams.CreateDefault< T > ( string  fullPath,
Identifier  speciesName,
XElement  mainElement 
)
static

Creates a default ragdoll for the species using a predefined configuration. Note: Use only to create ragdolls for new characters, because this overrides the old ragdoll!

Type Constraints
T :RagdollParams 
T :new() 

Definition at line 217 of file RagdollParams.cs.

◆ CreateJoints()

void Barotrauma.RagdollParams.CreateJoints ( )
protected

Definition at line 344 of file RagdollParams.cs.

◆ CreateLimbs()

void Barotrauma.RagdollParams.CreateLimbs ( )
protected

Definition at line 331 of file RagdollParams.cs.

◆ Deserialize()

bool Barotrauma.RagdollParams.Deserialize ( XElement  element = null,
bool  alsoChildren = true,
bool  recursive = true 
)

Definition at line 353 of file RagdollParams.cs.

◆ GetAllSubParams()

IEnumerable<SubParam> Barotrauma.RagdollParams.GetAllSubParams ( )
protected

◆ GetDefaultFile()

static string Barotrauma.RagdollParams.GetDefaultFile ( Identifier  speciesName,
ContentPackage  contentPackage = null 
)
static

◆ GetDefaultFileName()

static string Barotrauma.RagdollParams.GetDefaultFileName ( Identifier  speciesName)
static

◆ GetDefaultRagdollParams< T >()

static T Barotrauma.RagdollParams.GetDefaultRagdollParams< T > ( Identifier  speciesName)
static
Type Constraints
T :RagdollParams 
T :new() 
T :GetRagdollParams<T> 
T :speciesName 

◆ GetFolder()

static string Barotrauma.RagdollParams.GetFolder ( Identifier  speciesName,
ContentPackage  contentPackage = null 
)
static

Definition at line 104 of file RagdollParams.cs.

◆ GetRagdollParams< T >()

static T Barotrauma.RagdollParams.GetRagdollParams< T > ( Identifier  speciesName,
string  fileName = null 
)
static

If the file name is left null, default file is selected. If fails, will select the default file. Note: Use the filename without the extensions, don't use the full path! If a custom folder is used, it's defined in the character info file.

Type Constraints
T :RagdollParams 
T :new() 

Definition at line 132 of file RagdollParams.cs.

◆ Load()

bool Barotrauma.RagdollParams.Load ( ContentPath  file,
Identifier  speciesName 
)
protected

Definition at line 281 of file RagdollParams.cs.

◆ Redo()

void Barotrauma.RagdollParams.Redo ( )

◆ Reset()

override bool Barotrauma.RagdollParams.Reset ( bool  forceReload = false)
virtual

Resets the current properties to the xml (stored in memory). Force reload reloads the file from disk.

Reimplemented from Barotrauma.EditableParams.

Definition at line 305 of file RagdollParams.cs.

◆ Save()

bool Barotrauma.RagdollParams.Save ( string  fileNameWithoutExtension = null)

Definition at line 268 of file RagdollParams.cs.

◆ Serialize()

bool Barotrauma.RagdollParams.Serialize ( XElement  element = null,
bool  alsoChildren = true,
bool  recursive = true 
)

Definition at line 366 of file RagdollParams.cs.

◆ StoreSnapshot()

void Barotrauma.RagdollParams.StoreSnapshot ( )

Definition at line 419 of file RagdollParams.cs.

◆ Undo()

void Barotrauma.RagdollParams.Undo ( )

◆ UpdatePath()

override void Barotrauma.RagdollParams.UpdatePath ( ContentPath  fullPath)
protectedvirtual

Reimplemented from Barotrauma.EditableParams.

Definition at line 244 of file RagdollParams.cs.

Member Data Documentation

◆ MAX_SCALE

const float Barotrauma.RagdollParams.MAX_SCALE = 2
static

Definition at line 31 of file RagdollParams.cs.

◆ MIN_SCALE

const float Barotrauma.RagdollParams.MIN_SCALE = 0.1f
static

Definition at line 30 of file RagdollParams.cs.

Property Documentation

◆ CanEnterSubmarine

bool Barotrauma.RagdollParams.CanEnterSubmarine
getset

Definition at line 73 of file RagdollParams.cs.

◆ CanWalk

bool Barotrauma.RagdollParams.CanWalk
getset

Definition at line 76 of file RagdollParams.cs.

◆ ColliderHeightFromFloor

float Barotrauma.RagdollParams.ColliderHeightFromFloor
getset

Definition at line 67 of file RagdollParams.cs.

◆ Colliders

List<ColliderParams> Barotrauma.RagdollParams.Colliders = new List<ColliderParams>()
get

Definition at line 91 of file RagdollParams.cs.

◆ Color

Color Barotrauma.RagdollParams.Color
getset

Definition at line 39 of file RagdollParams.cs.

◆ Draggable

bool Barotrauma.RagdollParams.Draggable
getset

Definition at line 79 of file RagdollParams.cs.

◆ ImpactTolerance

float Barotrauma.RagdollParams.ImpactTolerance
getset

Definition at line 70 of file RagdollParams.cs.

◆ IsSpritesheetOrientationHorizontal

bool Barotrauma.RagdollParams.IsSpritesheetOrientationHorizontal
get

Definition at line 44 of file RagdollParams.cs.

◆ Joints

List<JointParams> Barotrauma.RagdollParams.Joints = new List<JointParams>()
get

Definition at line 93 of file RagdollParams.cs.

◆ JointScale

float Barotrauma.RagdollParams.JointScale
getset

Definition at line 60 of file RagdollParams.cs.

◆ Limbs

List<LimbParams> Barotrauma.RagdollParams.Limbs = new List<LimbParams>()
get

Definition at line 92 of file RagdollParams.cs.

◆ LimbScale

float Barotrauma.RagdollParams.LimbScale
getset

Definition at line 56 of file RagdollParams.cs.

◆ MainLimb

LimbType Barotrauma.RagdollParams.MainLimb
getset

Definition at line 82 of file RagdollParams.cs.

◆ Memento

Memento<RagdollParams> Barotrauma.RagdollParams.Memento = new Memento<RagdollParams>()
getprotected set

Definition at line 418 of file RagdollParams.cs.

◆ SpeciesName

Identifier Barotrauma.RagdollParams.SpeciesName
get

Definition at line 33 of file RagdollParams.cs.

◆ SpritesheetOrientation

float Barotrauma.RagdollParams.SpritesheetOrientation
getset

Definition at line 42 of file RagdollParams.cs.

◆ Texture

string Barotrauma.RagdollParams.Texture
getset

Definition at line 36 of file RagdollParams.cs.

◆ TextureScale

float Barotrauma.RagdollParams.TextureScale
getset

Definition at line 64 of file RagdollParams.cs.