Returns config classes containing search_string in name.
536 {
539
540 filtered_classes.Clear();
541
543
544 int nSearchingIn = searching_in.Count();
545 for ( int s = 0; s < nSearchingIn; ++s )
546 {
547 string config_path = searching_in.Get(s);
548
549 int objects_count =
g_Game.ConfigGetChildrenCount(config_path);
550 for (int i = 0; i < objects_count; i++)
551 {
552 string childName;
553 g_Game.ConfigGetChildName(config_path, i, childName);
554
555 if ( only_public )
556 {
557 int scope =
g_Game.ConfigGetInt( config_path +
" " + childName +
" scope" );
558 if ( scope == 0 )
559 {
560 continue;
561 }
562 }
563
564 string nchName = childName;
566
567 if ( nchName.
Contains(search_string) != -1)
568 {
569 filtered_classes.Insert(childName);
570 }
571 }
572 }
573 }
static void GetBaseConfigClasses(out TStringArray base_classes)
Returns some of base config classes strings like CfgVehicles, CfgWeapons, etc. for searching purposes...
array< string > TStringArray
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase. Returns length.