307 {
309 string cfg_path =
"cfgVehicles" +
" " +
GetParent().GetType() +
" "+
"Construction" +
" " + main_part_name +
" " + part_name +
" " +
"Materials";
310
311 if (
g_Game.ConfigIsExisting( cfg_path ) )
312 {
313 int child_count =
g_Game.ConfigGetChildrenCount( cfg_path );
314
315 for ( int i = 0; i < child_count; i++ )
316 {
317 string child_name;
318 g_Game.ConfigGetChildName( cfg_path, i, child_name );
319
320
321 string config_path;
322 string slot_name;
323 config_path = cfg_path + " " + child_name + " " + "slot_name";
324 g_Game.ConfigGetText( config_path, slot_name );
325 config_path = cfg_path + " " + child_name + " " + "quantity";
326 float quantity =
g_Game.ConfigGetFloat( config_path );
327 config_path = cfg_path + " " + child_name + " " + "lockable";
328 bool lockable =
g_Game.ConfigGetInt( config_path );
329
331 if (attachment.IsRuined())
332 return true;
333 }
334 }
335 return false;
336 }
ConstructionPart GetConstructionPart(string part_name)