115 {
116 int start = class_path.
IndexOf(
" ");
117 string name = class_path;
118 if ( start > -1 )
119 {
121 }
122
123 int cfg_class_count =
g_Game.ConfigGetChildrenCount( config_class_path );
124
125 for ( int i = 0; i < cfg_class_count; i++ )
126 {
127 string cfg_class_name = "";
128 g_Game.ConfigGetChildName( config_class_path, i, cfg_class_name );
129
130 if ( cfg_class_name ==
name )
131 {
132 string full_name = config_class_path +
" " +
name;
133 int type =
g_Game.ConfigGetType( full_name );
134
135 if ( type == CT_CLASS )
136 {
137 return true;
138 }
139 }
140 }
141
142 if ( start == -1 )
143 {
144 return false;
145 }
146 else
147 {
148 string new_name = class_path.
Substring(start + 1, class_path.
Length() - (start + 1) );
150 }
151 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
bool ContainsFirstClass(string config_class_path, string class_path)
proto native int Length()
Returns length of string.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.