DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Head.c
См. документацию.
1class Head_Default extends Head
2{
3 bool m_handling_exception = false;
6
9
11 {
12 Init();
13 }
14
15 void Init()
16 {
19
20 ConfigGetTextArray("simpleHiddenSelections",m_HeadHairSelectionArray);
21
24 if (!ConfigIsExisting("HairHiding"))
26
28 }
29
31 {
32 for (int i = 0; i < m_HeadHairSelectionArray.Count(); i++)
33 {
34 SelectionTranslation selTran = new SelectionTranslation(this,i);
35 selTran.SetSelectionState(true);
36 m_HeadHairHidingStateMap.Insert(i,selTran); //all considered "shown" on init
37 }
38 }
39
41 {
42 selections = m_HeadHairSelectionArray;
43 return true;
44 }
45
47 {
48 return m_beard_idx;
49 }
50
52 {
53 return m_hair_idx;
54 }
55
56 int GetSelectionIndex(string str)
57 {
58 return m_HeadHairSelectionArray.Find(str);
59 }
60
62 {
64 }
65};
66
68{
70
72 string m_BasePath;// = "cfgVehicles " + GetType() + " HairHiding";
74 Head_Default m_Head;
75
76 void SelectionTranslation(Head_Default head, int idx)
77 {
78 m_Head = head;
79 m_BasePath = "cfgVehicles " + m_Head.GetType() + " HairHiding";
81 }
82
84 {
85 if ( !m_Head.ConfigIsExisting("HairHiding") )
86 return;
87
88 string path;
89 int selectionIdx = -1;
91
92 //Hair
93 path = m_BasePath + " Group_Hair";
95 //Beard
96 path = m_BasePath + " Group_Beard";
98 //Hair + Beard
99 path = m_BasePath + " Group_HairBeard";
101
102 //other
103 for (int i = 0; !m_TranslationFinished; i++)
104 {
105 path = m_BasePath + " Group_" + i;
106 if ( g_Game.ConfigIsExisting(path) )
107 {
109 }
110 else
111 {
113 }
114 }
115 }
116
117 bool SearchAndTranslate(string path, int idx)
118 {
119 if (!g_Game.ConfigIsExisting(path))
120 return false;
121
122 array<string> tempArrayStr = new array<string>;
123 g_Game.ConfigGetTextArray(path + " memberSelections", tempArrayStr);
124 int indexInOriginalArray = -2;
125
126 for (int i = 0; i < tempArrayStr.Count(); i++)
127 {
128 indexInOriginalArray = m_Head.m_HeadHairSelectionArray.Find(tempArrayStr.Get(i));
129 if ( idx == indexInOriginalArray ) //found it
130 {
131 g_Game.ConfigGetTextArray(path + " simpleSelectionName", tempArrayStr);
132 for (i = 0; i < tempArrayStr.Count(); i++)
133 {
134 m_TranslatedSelections.Insert(m_Head.m_HeadHairSelectionArray.Find(tempArrayStr.Get(i)));
135 }
137 return true;
138 }
139 }
140 return false;
141 }
142
143 void SetSelectionState(bool state)
144 {
145 m_SelectionState = state;
146 }
147
149 {
150 return m_SelectionState;
151 }
152
157};
map
Определения ControlsXboxNew.c:4
DayZGame g_Game
Определения DayZGame.c:3868
string path
Определения OptionSelectorMultistate.c:142
ref array< string > m_HeadHairSelectionArray
Определения Head.c:8
bool IsHandlingException()
Определения Head.c:61
bool GetHeadHideableSelections(out array< string > selections)
Определения Head.c:40
bool m_handling_exception
Определения Head.c:3
ref map< int, ref SelectionTranslation > m_HeadHairHidingStateMap
Определения Head.c:7
int m_hair_idx
Определения Head.c:5
int GetBeardIndex()
Определения Head.c:46
int GetHairIndex()
Определения Head.c:51
int m_beard_idx
Определения Head.c:4
void InitSelectionTranslation()
Определения Head.c:30
void Init()
Определения Head.c:15
void Head_Default()
Определения Head.c:10
int GetSelectionIndex(string str)
Определения Head.c:56
Определения Head.c:2
string m_BasePath
Определения Head.c:72
bool SearchAndTranslate(string path, int idx)
Определения Head.c:117
void InitTranslatedSelections(int idx)
Определения Head.c:83
ref array< int > m_TranslatedSelections
Определения Head.c:73
Head_Default m_Head
Определения Head.c:74
bool m_SelectionState
Определения Head.c:69
void SetSelectionState(bool state)
Определения Head.c:143
ref array< int > GetTranslatedSelections()
Определения Head.c:153
void SelectionTranslation(Head_Default head, int idx)
Определения Head.c:76
bool GetSelectionState()
Определения Head.c:148
bool m_TranslationFinished
Определения Head.c:71
Определения Head.c:68
Result for an object found in CGame.IsBoxCollidingGeometryProxy.