Space Engineers
|
Prefer getting definition ID using object builder used to create the item. If you have automatic rifle, in its Init method create new MyDefinitionId using TypeId and SubtypeName of object builder. Do not write specific values in code, as data comes from XML and if those change, code needs to change as well. More...
Classes | |
class | DefinitionIdComparerType |
Public Member Functions | |
MyDefinitionId (MyObjectBuilderType type) | |
MyDefinitionId (MyObjectBuilderType type, string subtypeName) | |
MyDefinitionId (MyObjectBuilderType type, MyStringHash subtypeId) | |
MyDefinitionId (MyRuntimeObjectBuilderId type, MyStringHash subtypeId) | |
override int | GetHashCode () |
long | GetHashCodeLong () |
Safer hash code. It is unique in more situations than GetHashCode would be, but it may still require full check. More... | |
override bool | Equals (object obj) |
override string | ToString () |
bool | Equals (MyDefinitionId other) |
Static Public Member Functions | |
static MyDefinitionId | FromContent (MyObjectBuilder_Base content) |
Creates a new definition ID from a given content. More... | |
static MyDefinitionId | Parse (string id) |
Attempts to create a definition ID from a definition string, which has the form (using ores as an example) "MyObjectBuilder_Ore/Iron". The first part must represent an existing type. If it does not, an exception will be thrown. The second (the subtype) is not enforced. See TryParse for a parsing method that does not throw an exception. More... | |
static bool | TryParse (string id, out MyDefinitionId definitionId) |
Attempts to create a definition ID from a definition string, which has the form (using ores as an example) "MyObjectBuilder_Ore/Iron". The first part must represent an existing type, while the second (the subtype) is not enforced. More... | |
static bool | operator== (MyDefinitionId l, MyDefinitionId r) |
static bool | operator!= (MyDefinitionId l, MyDefinitionId r) |
static implicit | operator MyDefinitionId (SerializableDefinitionId v) |
static implicit | operator SerializableDefinitionId (MyDefinitionId v) |
Public Attributes | |
readonly MyObjectBuilderType | TypeId |
readonly MyStringHash | SubtypeId |
Static Public Attributes | |
static readonly DefinitionIdComparerType | Comparer = new DefinitionIdComparerType() |
Properties | |
string | SubtypeName [get] |
Prefer getting definition ID using object builder used to create the item. If you have automatic rifle, in its Init method create new MyDefinitionId using TypeId and SubtypeName of object builder. Do not write specific values in code, as data comes from XML and if those change, code needs to change as well.
Definition at line 18 of file MyDefinitionId.cs.
|
inline |
Definition at line 106 of file MyDefinitionId.cs.
|
inline |
Definition at line 111 of file MyDefinitionId.cs.
|
inline |
Definition at line 116 of file MyDefinitionId.cs.
|
inline |
Definition at line 122 of file MyDefinitionId.cs.
|
inline |
Definition at line 143 of file MyDefinitionId.cs.
|
inline |
Definition at line 155 of file MyDefinitionId.cs.
|
inlinestatic |
Creates a new definition ID from a given content.
content |
Definition at line 25 of file MyDefinitionId.cs.
|
inline |
Definition at line 128 of file MyDefinitionId.cs.
|
inline |
Safer hash code. It is unique in more situations than GetHashCode would be, but it may still require full check.
Definition at line 138 of file MyDefinitionId.cs.
|
inlinestatic |
Definition at line 171 of file MyDefinitionId.cs.
|
inlinestatic |
Definition at line 177 of file MyDefinitionId.cs.
|
inlinestatic |
Definition at line 166 of file MyDefinitionId.cs.
|
inlinestatic |
Definition at line 161 of file MyDefinitionId.cs.
|
inlinestatic |
Attempts to create a definition ID from a definition string, which has the form (using ores as an example) "MyObjectBuilder_Ore/Iron". The first part must represent an existing type. If it does not, an exception will be thrown. The second (the subtype) is not enforced. See TryParse for a parsing method that does not throw an exception.
id |
Definition at line 37 of file MyDefinitionId.cs.
|
inline |
Definition at line 148 of file MyDefinitionId.cs.
|
inlinestatic |
Attempts to create a definition ID from a definition string, which has the form (using ores as an example) "MyObjectBuilder_Ore/Iron". The first part must represent an existing type, while the second (the subtype) is not enforced.
id | |
definitionId |
Definition at line 52 of file MyDefinitionId.cs.
|
static |
Definition at line 95 of file MyDefinitionId.cs.
readonly MyStringHash VRage.Game.MyDefinitionId.SubtypeId |
Definition at line 99 of file MyDefinitionId.cs.
readonly MyObjectBuilderType VRage.Game.MyDefinitionId.TypeId |
Definition at line 98 of file MyDefinitionId.cs.
|
get |
Definition at line 102 of file MyDefinitionId.cs.