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

◆ GetItemNamesForSlots()

map< string, ref TStringArray > UIScriptedMenu::GetItemNamesForSlots ( TStringArray slots)
inlineprivate

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

1336 {
1337 TStringArray searching_in = new TStringArray;
1338 searching_in.Insert(CFG_VEHICLESPATH);
1339 searching_in.Insert(CFG_WEAPONSPATH);
1340 searching_in.Insert(CFG_MAGAZINESPATH);
1341
1343
1344 for ( int m = 0; m < slots.Count(); ++m )
1345 {
1346 array_ret.Insert(slots.Get(m), new TStringArray);
1347 }
1348
1349 TStringArray inv_slots = new TStringArray;
1350 string inv_slot;
1351 string childName;
1352
1353 for ( int s = 0; s < searching_in.Count(); ++s )
1354 {
1355 string config_path = searching_in.Get(s);
1356
1357 int objects_count = g_Game.ConfigGetChildrenCount(config_path);
1358 for (int i = 0; i < objects_count; i++)
1359 {
1360 g_Game.ConfigGetChildName(config_path, i, childName);
1361
1362 g_Game.ConfigGetTextArray(config_path + " " + childName + " inventorySlot", inv_slots);
1363
1364 if ( inv_slots.Count() > 0 )
1365 {
1366 for ( int j = 0; j < inv_slots.Count(); ++j )
1367 {
1368 inv_slot = "";
1369 inv_slot = inv_slots.Get(j);
1370
1371 for ( int k = 0; k < slots.Count(); ++k )
1372 {
1373 string finding_slot_type = slots.Get(k);
1374
1375 if ( inv_slot == finding_slot_type )
1376 {
1377 array_ret.Get(finding_slot_type).Insert(childName);
1378 }
1379 }
1380 }
1381 }
1382 else
1383 {
1384 inv_slot = "";
1385 g_Game.ConfigGetText(config_path + " " + childName + " inventorySlot", inv_slot);
1386
1387 if ( inv_slot != "" )
1388 {
1389 for ( int l = 0; l < slots.Count(); ++l )
1390 {
1391 string finding_slot_type_2 = slots.Get(l);
1392
1393 if ( inv_slot == finding_slot_type_2 )
1394 {
1395 array_ret.Get(finding_slot_type_2).Insert(childName);
1396 }
1397 }
1398 }
1399 }
1400 }
1401 }
1402
1403 return array_ret;
1404 }
map
Определения ControlsXboxNew.c:4
DayZGame g_Game
Определения DayZGame.c:3868
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 и g_Game.

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