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

◆ GetDialNumberText()

string ConstructionActionData::GetDialNumberText ( )
inlineprotected

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

216 {
217 string dial_text;
218
219 if ( m_CombinationLock )
220 {
221 string combination_text = m_CombinationLock.GetCombination().ToString();
222
223 //insert zeros to dials with 0 value
224 int length_diff = m_CombinationLock.GetLockDigits() - combination_text.Length();
225 for ( int i = 0; i < length_diff; ++i )
226 {
227 combination_text = "0" + combination_text;
228 }
229
230 //assemble the whole combination with selected part
231 for ( int j = 0; j < m_CombinationLock.GetLockDigits(); ++j )
232 {
233 if ( j == m_CombinationLock.GetDialIndex() )
234 {
235 dial_text += string.Format( "[%1]", combination_text.Get( j ) );
236 }
237 else
238 {
239 dial_text += string.Format( " %1 ", combination_text.Get( j ) );
240 }
241 }
242 }
243
244 return dial_text;
245 }
CombinationLock m_CombinationLock
Определения ConstructionActionData.c:15
proto native int Length()
Returns length of string.
proto string Get(int index)
Gets n-th character from string.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.

Перекрестные ссылки string::Format(), string::Get(), string::Length() и m_CombinationLock.

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