274 {
276
277 string combinationText;
278 string dialedText;
279
280 if (!isInsideLock)
281 {
283 }
284 else
285 {
287 }
288
289
291 for (int i = 0; i < lengthDiff; ++i)
292 {
293 combinationText = "0" + combinationText;
294 }
295
296 for (
int j = 0; j < combinationText.
Length(); ++j)
297 {
299 {
300 int nextDialedNumber = combinationText.
Get(j).
ToInt() + 1;
301 if (nextDialedNumber > 9)
302 {
303 nextDialedNumber = 0;
304 }
305
306 dialedText += nextDialedNumber.
ToString();
307 }
308 else
309 {
310 dialedText += combinationText.
Get(j);
311 }
312 }
313
314
315 if (!isInsideLock)
316 {
319 }
320 else
321 {
324 }
325
326
328 }
void SetCombination(int combination, bool setOtherSide=true)
static const int FACING_INSIDE
void SetCombinationInside(int combination, bool setOtherSide=true)
LockAction m_LockActionPerformed
proto native int Length()
Returns length of string.
proto string Get(int index)
Gets n-th character from string.
static proto string ToString(void var, bool type=false, bool name=false, bool quotes=true)
Return string representation of variable.
proto native int ToInt()
Converts string to integer.