DayZ 1.24
Loading...
Searching...
No Matches
SelectionTranslation Class Reference
Collaboration diagram for SelectionTranslation:
[legend]

Private Member Functions

void SelectionTranslation (Head_Default head, int idx)
 
void InitTranslatedSelections (int idx)
 
bool SearchAndTranslate (string path, int idx)
 
void SetSelectionState (bool state)
 
bool GetSelectionState ()
 
ref array< intGetTranslatedSelections ()
 

Private Attributes

bool m_SelectionState
 
bool m_TranslationFinished = false
 
string m_BasePath
 
ref array< intm_TranslatedSelections
 
Head_Default m_Head
 

Detailed Description

Definition at line 67 of file Head.c.

Constructor & Destructor Documentation

◆ SelectionTranslation()

void SelectionTranslation::SelectionTranslation ( Head_Default head,
int idx )
inlineprivate

Definition at line 76 of file Head.c.

77 {
78 m_Head = head;
79 m_BasePath = "cfgVehicles " + m_Head.GetType() + " HairHiding";
81 }
string m_BasePath
Definition Head.c:72
void InitTranslatedSelections(int idx)
Definition Head.c:83
Head_Default m_Head
Definition Head.c:74

References InitTranslatedSelections(), m_BasePath, and m_Head.

Member Function Documentation

◆ GetSelectionState()

bool SelectionTranslation::GetSelectionState ( )
inlineprivate

Definition at line 142 of file Head.c.

143 {
144 return m_SelectionState;
145 }
bool m_SelectionState
Definition Head.c:69

References m_SelectionState.

◆ GetTranslatedSelections()

ref array< int > SelectionTranslation::GetTranslatedSelections ( )
inlineprivate

Definition at line 147 of file Head.c.

148 {
150 }
ref array< int > m_TranslatedSelections
Definition Head.c:73

References m_TranslatedSelections.

◆ InitTranslatedSelections()

void SelectionTranslation::InitTranslatedSelections ( int idx)
inlineprivate

Definition at line 83 of file Head.c.

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))
108 else
110 }
111 }
DayZGame g_Game
Definition DayZGame.c:3528
bool SearchAndTranslate(string path, int idx)
Definition Head.c:113
bool m_TranslationFinished
Definition Head.c:71

References g_Game, m_BasePath, m_Head, m_TranslatedSelections, m_TranslationFinished, path, and SearchAndTranslate().

Referenced by SelectionTranslation().

◆ SearchAndTranslate()

bool SelectionTranslation::SearchAndTranslate ( string path,
int idx )
inlineprivate

Definition at line 113 of file Head.c.

114 {
115 if (!g_Game.ConfigIsExisting(path))
116 return false;
117
119 g_Game.ConfigGetTextArray(path + " memberSelections", tempArrayStr);
120 int indexInOriginalArray = -2;
121
122 for (int i = 0; i < tempArrayStr.Count(); i++)
123 {
124 indexInOriginalArray = m_Head.m_HeadHairSelectionArray.Find(tempArrayStr.Get(i));
125 if (idx == indexInOriginalArray) //found it
126 {
127 g_Game.ConfigGetTextArray(path + " simpleSelectionName", tempArrayStr);
128 for (i = 0; i < tempArrayStr.Count(); i++)
129 m_TranslatedSelections.Insert(m_Head.m_HeadHairSelectionArray.Find(tempArrayStr.Get(i)));
131 return true;
132 }
133 }
134 return false;
135 }

References g_Game, m_Head, m_TranslatedSelections, m_TranslationFinished, and path.

Referenced by InitTranslatedSelections().

◆ SetSelectionState()

void SelectionTranslation::SetSelectionState ( bool state)
inlineprivate

Definition at line 137 of file Head.c.

138 {
140 }

References m_SelectionState.

Member Data Documentation

◆ m_BasePath

string SelectionTranslation::m_BasePath
private

Definition at line 72 of file Head.c.

Referenced by InitTranslatedSelections(), and SelectionTranslation().

◆ m_Head

Head_Default SelectionTranslation::m_Head
private

Definition at line 74 of file Head.c.

Referenced by InitTranslatedSelections(), SearchAndTranslate(), and SelectionTranslation().

◆ m_SelectionState

bool SelectionTranslation::m_SelectionState
private

Definition at line 69 of file Head.c.

Referenced by GetSelectionState(), and SetSelectionState().

◆ m_TranslatedSelections

ref array<int> SelectionTranslation::m_TranslatedSelections
private

Definition at line 73 of file Head.c.

Referenced by GetTranslatedSelections(), InitTranslatedSelections(), and SearchAndTranslate().

◆ m_TranslationFinished

bool SelectionTranslation::m_TranslationFinished = false
private

Definition at line 71 of file Head.c.

Referenced by InitTranslatedSelections(), and SearchAndTranslate().


The documentation for this class was generated from the following file: