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

◆ TranslateLockSelectionIntoDoorIdx()

int ActionUnlockShippingContainer::TranslateLockSelectionIntoDoorIdx ( ActionTarget target)
inlineprotected

Returns door idx.

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

46 {
47 //side1_lock
48 ContainerLockedBase shipCont;
49 if (Class.CastTo(shipCont, target.GetObject()))
50 {
51 string selectionName = shipCont.GetActionComponentName( target.GetComponentIndex() );
52
53 if (selectionName.Contains("_lock"))
54 return (selectionName.Substring(4,1).ToInt() - 1);
55 }
56
57 return -1;
58 }
void ContainerLockedBase()
Определения ContainerLocked.c:114
proto native int ToInt()
Converts string to integer.
bool Contains(string sample)
Returns true if sample is substring of string.
Определения EnString.c:286
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.

Перекрестные ссылки ActionTarget, Class::CastTo(), string::Contains(), string::Substring() и string::ToInt().

Используется в ActionCondition() и UnlockDoor().