Barotrauma Client Doc
Barotrauma.Serialize Class Reference
Inheritance diagram for Barotrauma.Serialize:

Public Member Functions

 Serialize (object defaultValue, IsPropertySaveable isSaveable, string description="", string translationTextTag="", bool alwaysUseInstanceValues=false)
 Makes the property serializable to/from XML More...
 

Public Attributes

readonly object DefaultValue
 
readonly IsPropertySaveable IsSaveable
 
readonly Identifier TranslationTextTag
 
bool AlwaysUseInstanceValues
 If set to true, the instance values saved in a submarine file will always override the prefab values, even if using a mod that normally overrides instance values. More...
 
string Description
 

Detailed Description

Definition at line 25 of file SerializableProperty.cs.

Constructor & Destructor Documentation

◆ Serialize()

Barotrauma.Serialize.Serialize ( object  defaultValue,
IsPropertySaveable  isSaveable,
string  description = "",
string  translationTextTag = "",
bool  alwaysUseInstanceValues = false 
)

Makes the property serializable to/from XML

Parameters
defaultValueThe property is set to this value during deserialization if the value is not defined in XML.
isSaveableIs the value saved to XML when serializing.
translationTextTagIf set to anything else than null, SerializableEntityEditors will show what the text gets translated to or warn if the text is not found in the language files.
Parameters
alwaysUseInstanceValuesIf set to true, the instance values saved in a submarine file will always override the prefab values, even if using a mod that normally overrides instance values. Setting the value to a non-empty string will let the user select the text from one whose tag starts with the given string (e.g. RoomName. would show all texts with a RoomName.* tag)

Definition at line 46 of file SerializableProperty.cs.

Member Data Documentation

◆ AlwaysUseInstanceValues

bool Barotrauma.Serialize.AlwaysUseInstanceValues

If set to true, the instance values saved in a submarine file will always override the prefab values, even if using a mod that normally overrides instance values.

Definition at line 34 of file SerializableProperty.cs.

◆ DefaultValue

readonly object Barotrauma.Serialize.DefaultValue

Definition at line 27 of file SerializableProperty.cs.

◆ Description

string Barotrauma.Serialize.Description

Definition at line 36 of file SerializableProperty.cs.

◆ IsSaveable

readonly IsPropertySaveable Barotrauma.Serialize.IsSaveable

Definition at line 28 of file SerializableProperty.cs.

◆ TranslationTextTag

readonly Identifier Barotrauma.Serialize.TranslationTextTag

Definition at line 29 of file SerializableProperty.cs.