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

◆ GetItemSlots()

array< string > Attachments::GetItemSlots ( EntityAI e)
inlineprotected

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

564 {
565 TStringArray searching_in = new TStringArray;
566 searching_in.Insert( CFG_VEHICLESPATH );
567 searching_in.Insert( CFG_WEAPONSPATH );
568 searching_in.Insert( CFG_MAGAZINESPATH );
569
570 array<string> attachments_slots = new array<string>;
571 int i = 0;
572 for ( int s = 0; s < searching_in.Count(); ++s )
573 {
574 string cfg_name = searching_in.Get( s );
575 string path = cfg_name + " " + e.GetType();
576
577 if ( GetGame().ConfigIsExisting( path ) )
578 {
579 GetGame().ConfigGetTextArray( path + " attachments", attachments_slots );
580 if ( e.IsWeapon() && (!e.ConfigIsExisting("DisplayMagazine") || e.ConfigGetBool("DisplayMagazine")) )
581 {
582 attachments_slots.Insert( "magazine" );
583 }
584
585 return attachments_slots;
586 }
587 }
588 if ( e.IsWeapon() && (!e.ConfigIsExisting("DisplayMagazine") || e.ConfigGetBool("DisplayMagazine")) )
589 {
590 attachments_slots.Insert( "magazine" );
591 }
592
593 return attachments_slots;
594 }
string path
Определения OptionSelectorMultistate.c:142
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:685
const string CFG_VEHICLESPATH
Определения constants.c:220
const string CFG_WEAPONSPATH
Определения constants.c:221
const string CFG_MAGAZINESPATH
Определения constants.c:222

Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, CGame::ConfigGetTextArray(), GetGame() и path.

Используется в Attachments().