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

◆ GetZoneSelection()

override string ActionUnmountBarbedWire::GetZoneSelection ( ActionTarget target)
inlineprivate

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

54 {
55 BaseBuildingBase base_building = BaseBuildingBase.Cast(target.GetObject());
56 string selection = base_building.GetActionComponentName(target.GetComponentIndex());
57
58 if (selection.Length() > 0)
59 {
60 int delimiter_index = selection.IndexOfFrom(0, "_mounted");
61 if (delimiter_index > -1)
62 {
63 selection = selection.Substring(0, delimiter_index);
64 }
65 /*else if (!selection.Contains("_barbedwire_") && selection.Contains("_wall_"))
66 {
67 selection.Insert(selection.Length(),"_barbedwire_1");
68 }*/
69 }
70 //Print(selection);
71 return selection;
72 }
void BaseBuildingBase()
Определения BaseBuildingBase.c:1328
proto native int Length()
Returns length of string.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOfFrom(int start, string sample)
Finds 'sample' in 'str' from 'start' position. Returns -1 when not found.

Перекрестные ссылки ActionTarget, string::IndexOfFrom(), string::Length() и string::Substring().