Barotrauma Client
Loading...
Searching...
No Matches
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.
 
override bool Reset (bool forceReload=false)
 Resets the current properties to the xml (stored in memory). Force reload reloads the file from disk.
 
bool Deserialize (XElement element=null, bool alsoChildren=true, bool recursive=true)
 
bool Serialize (XElement element=null, bool alsoChildren=true, bool recursive=true)
 
void TryApplyVariantScale (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)
 
- 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 > (Character character)
 
static T GetDefaultRagdollParams< T > (Identifier speciesName, CharacterParams characterParams, ContentPackage contentPackage)
 
static T GetDefaultRagdollParams< T > (Identifier speciesName, XElement characterRootElement, ContentPackage contentPackage)
 
static T GetRagdollParams< T > (Identifier speciesName, Identifier ragdollSpecies, Either< string, ContentPath > file, ContentPackage contentPackage)
 
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!
 
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]
 Can be used for scaling the textures without having to readjust the entire ragdoll. Note that we'll still have to readjust the source rects and the colliders sizes, unless we also adjust SourceRectScale. E.g. for upscaling the textures 2x, set TextureScale to 0.5 and SourceRectScale to 2.
 
float SourceRectScale [get, set]
 Multiplies both the position and the size of the source rects. Used for scaling the textures when we cannot/don't want to touch the source rect definitions (e.g. on variants).
 
float ColliderHeightFromFloor [get, set]
 
float ImpactTolerance [get, set]
 
CanEnterSubmarine 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 FileNameWithoutExtension [get]
 
string Folder [get]
 
ContentPath Path = ContentPath.Empty [get, protected set]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get, protected set]
 
virtual ContentXElement MainElement [get]
 
ContentXElement OriginalElement [get, protected set]
 
- Properties inherited from Barotrauma.ISerializableEntity
- Properties inherited from Barotrauma.IMemorizable< RagdollParams >
Memento< T > Memento [get]
 

Additional Inherited Members

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

Member Function Documentation

◆ Apply()

void Barotrauma.RagdollParams.Apply ( )

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

◆ ClearCache()

static void Barotrauma.RagdollParams.ClearCache ( )
static

◆ ClearHistory()

void Barotrauma.RagdollParams.ClearHistory ( )

◆ CreateColliders()

void Barotrauma.RagdollParams.CreateColliders ( )
protected

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

◆ CreateJoints()

void Barotrauma.RagdollParams.CreateJoints ( )
protected

◆ CreateLimbs()

void Barotrauma.RagdollParams.CreateLimbs ( )
protected

◆ Deserialize()

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

◆ 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 >() [1/3]

static T Barotrauma.RagdollParams.GetDefaultRagdollParams< T > ( Character character)
static
Type Constraints
T :RagdollParams 
T :new() 

◆ GetDefaultRagdollParams< T >() [2/3]

static T Barotrauma.RagdollParams.GetDefaultRagdollParams< T > ( Identifier speciesName,
CharacterParams characterParams,
ContentPackage contentPackage )
static
Type Constraints
T :RagdollParams 
T :new() 

◆ GetDefaultRagdollParams< T >() [3/3]

static T Barotrauma.RagdollParams.GetDefaultRagdollParams< T > ( Identifier speciesName,
XElement characterRootElement,
ContentPackage contentPackage )
static
Type Constraints
T :RagdollParams 
T :new() 

◆ GetFolder()

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

◆ GetRagdollParams< T >()

static T Barotrauma.RagdollParams.GetRagdollParams< T > ( Identifier speciesName,
Identifier ragdollSpecies,
Either< string, ContentPath > file,
ContentPackage contentPackage )
static
Type Constraints
T :RagdollParams 
T :new() 

◆ Load()

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

◆ 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.

◆ Save()

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

◆ Serialize()

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

◆ StoreSnapshot()

void Barotrauma.RagdollParams.StoreSnapshot ( )

◆ TryApplyVariantScale()

void Barotrauma.RagdollParams.TryApplyVariantScale ( XDocument variantFile)

◆ Undo()

void Barotrauma.RagdollParams.Undo ( )

◆ UpdatePath()

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

Reimplemented from Barotrauma.EditableParams.

Member Data Documentation

◆ MAX_SCALE

const float Barotrauma.RagdollParams.MAX_SCALE = 2
static

◆ MIN_SCALE

const float Barotrauma.RagdollParams.MIN_SCALE = 0.1f
static

Property Documentation

◆ CanEnterSubmarine

CanEnterSubmarine Barotrauma.RagdollParams.CanEnterSubmarine
getset

◆ CanWalk

bool Barotrauma.RagdollParams.CanWalk
getset

◆ ColliderHeightFromFloor

float Barotrauma.RagdollParams.ColliderHeightFromFloor
getset

◆ Colliders

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

◆ Color

Color Barotrauma.RagdollParams.Color
getset

◆ Draggable

bool Barotrauma.RagdollParams.Draggable
getset

◆ ImpactTolerance

float Barotrauma.RagdollParams.ImpactTolerance
getset

◆ IsSpritesheetOrientationHorizontal

bool Barotrauma.RagdollParams.IsSpritesheetOrientationHorizontal
get

◆ Joints

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

◆ JointScale

float Barotrauma.RagdollParams.JointScale
getset

◆ Limbs

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

◆ LimbScale

float Barotrauma.RagdollParams.LimbScale
getset

◆ MainLimb

LimbType Barotrauma.RagdollParams.MainLimb
getset

◆ Memento

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

◆ SourceRectScale

float Barotrauma.RagdollParams.SourceRectScale
getset

Multiplies both the position and the size of the source rects. Used for scaling the textures when we cannot/don't want to touch the source rect definitions (e.g. on variants).

◆ SpeciesName

Identifier Barotrauma.RagdollParams.SpeciesName
get

◆ SpritesheetOrientation

float Barotrauma.RagdollParams.SpritesheetOrientation
getset

◆ Texture

string Barotrauma.RagdollParams.Texture
getset

◆ TextureScale

float Barotrauma.RagdollParams.TextureScale
getset

Can be used for scaling the textures without having to readjust the entire ragdoll. Note that we'll still have to readjust the source rects and the colliders sizes, unless we also adjust SourceRectScale. E.g. for upscaling the textures 2x, set TextureScale to 0.5 and SourceRectScale to 2.


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