DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetFiltredConfigClasses()

static void Debug::GetFiltredConfigClasses ( string search_string,
out TStringArray filtered_classes,
bool only_public = true )
inlinestaticprivate

Returns config classes containing search_string in name.

Аргументы
search_stringstring String to search in class names
filtered_classesout TStringArray Array containing filtered classes based on search_string
only_publicbool Set to true to return only public classes, set to false to return all filtered classes

См. определение в файле Debug.c строка 438

439 {
440 TStringArray searching_in = new TStringArray;
441 GetBaseConfigClasses( searching_in );
442
443 filtered_classes.Clear();
444
445 search_string.ToLower();
446
447 for ( int s = 0; s < searching_in.Count(); ++s )
448 {
449 string config_path = searching_in.Get(s);
450
451 int objects_count = GetGame().ConfigGetChildrenCount(config_path);
452 for (int i = 0; i < objects_count; i++)
453 {
454 string childName;
455 GetGame().ConfigGetChildName(config_path, i, childName);
456
457 if ( only_public )
458 {
459 int scope = GetGame().ConfigGetInt( config_path + " " + childName + " scope" );
460 if ( scope == 0 )
461 {
462 continue;
463 }
464 }
465
466 string nchName = childName;
467 nchName.ToLower();
468
469 if ( nchName.Contains(search_string) != -1)
470 {
471 filtered_classes.Insert(childName);
472 }
473 }
474 }
475 }
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
static void GetBaseConfigClasses(out TStringArray base_classes)
Returns some of base config classes strings like CfgVehicles, CfgWeapons, etc. for searching purposes...
Определения Debug.c:417
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:685
bool Contains(string sample)
Returns true if sample is substring of string.
Определения EnString.c:286
proto int ToLower()
Changes string to lowercase. Returns length.

Перекрестные ссылки CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetInt(), string::Contains(), GetBaseConfigClasses(), GetGame() и string::ToLower().