Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
hiddenselectionsdata.c
Go to the documentation of this file.
2 {
3  ref array<string> m_HiddenSelections = new array<string>;
4  ref array<string> m_HiddenSelectionsTextures = new array<string>;
5  ref array<string> m_HiddenSelectionsMaterials = new array<string>;
6 
7  ref map<string, int> m_HiddenSelectionNameToIndex = new map<string, int>;
8 
9  void HiddenSelectionsData(string type)
10  {
11  GetGame().ConfigGetTextArray( string.Format("CfgVehicles %1 hiddenSelections", type), m_HiddenSelections );
12  GetGame().ConfigGetTextArray( string.Format("CfgVehicles %1 hiddenSelectionsTextures", type), m_HiddenSelectionsTextures );
13  GetGame().ConfigGetTextArray( string.Format("CfgVehicles %1 hiddenSelectionsMaterials", type), m_HiddenSelectionsMaterials );
14 
15  for (int i = 0; i < m_HiddenSelections.Count(); ++i)
16  m_HiddenSelectionNameToIndex.Insert(m_HiddenSelections[i], i);
17  }
18 
19  int GetHiddenSelectionIndex(string selection)
20  {
21  int index;
22  if (m_HiddenSelectionNameToIndex.Find(selection, index))
23  return index;
24 
25  return -1;
26  }
27 
28  TStringArray GetHiddenSelectionsTextures()
29  {
30  return m_HiddenSelectionsTextures;
31  }
32 
33  TStringArray GetHiddenSelectionsMaterials()
34  {
35  return m_HiddenSelectionsMaterials;
36  }
37 
38  static array<string> GetHiddenSelectionsConfig(string type)
39  {
40  array<string> hiddenSelections = new array<string>;
41  GetGame().ConfigGetTextArray( string.Format("CfgVehicles %1 hiddenSelections", type), hiddenSelections );
42  return hiddenSelections;
43  }
44 
45  static array<string> GetHiddenSelectionsTexturesConfig(string type)
46  {
47  array<string> hiddenSelectionsTextures = new array<string>;
48  GetGame().ConfigGetTextArray( string.Format("CfgVehicles %1 hiddenSelectionsTextures", type), hiddenSelectionsTextures );
49  return hiddenSelectionsTextures;
50  }
51 
52  static array<string> GetHiddenSelectionsMaterialsConfig(string type)
53  {
54  array<string> hiddenSelectionsMaterials = new array<string>;
55  GetGame().ConfigGetTextArray( string.Format("CfgVehicles %1 hiddenSelectionsMaterials", type), hiddenSelectionsMaterials );
56  return hiddenSelectionsMaterials;
57  }
58 }
GetGame
proto native CGame GetGame()
HiddenSelectionsData
Definition: hiddenselectionsdata.c:1
map
map
Definition: controlsxboxnew.c:3
array< string >