Returns config classes containing search_string in name.
549 {
552
553 filtered_classes.Clear();
554
556
557 int nSearchingIn = searching_in.Count();
558 for ( int s = 0; s < nSearchingIn; ++s )
559 {
560 string config_path = searching_in.Get(s);
561
562 int objects_count =
g_Game.ConfigGetChildrenCount(config_path);
563 for (int i = 0; i < objects_count; i++)
564 {
565 string childName;
566 g_Game.ConfigGetChildName(config_path, i, childName);
567
568 if ( only_public )
569 {
570 int scope =
g_Game.ConfigGetInt( config_path +
" " + childName +
" scope" );
571 if ( scope == 0 )
572 {
573 continue;
574 }
575 }
576
577 string nchName = childName;
579
580 if ( nchName.
Contains(search_string) != -1)
581 {
582 filtered_classes.Insert(childName);
583 }
584 }
585 }
586 }
static void GetBaseConfigClasses(out TStringArray base_classes)
Returns some of base config classes strings like CfgVehicles, CfgWeapons, etc. for searching purposes...
class array< Class T > TStringArray
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase. Returns length.