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

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

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

43 {
44 if (item && item.IsHeavyBehaviour())
45 return false;
46
47 if (!player.CanEatAndDrink())
48 return false;
49
50 Object targetObject = target.GetObject();
51 if (targetObject)
52 {
53 TIntArray componentIndices = new TIntArray();
54 targetObject.GetActionComponentsForSelectionName(targetObject.GetViewGeometryLevel(), UAMisc.LIQUID_SOURCE_SELECTION, componentIndices);
55 if (componentIndices.Count() > 0 && componentIndices.Find(target.GetComponentIndex()) == -1)
56 return false;
57 }
58
59 return targetObject && (targetObject.GetWaterSourceObjectType() == EWaterSourceObjectType.WELL || targetObject.IsWell());
60 }
EWaterSourceObjectType
Определения EWaterSourceObjectType.c:2
Определения ObjectTyped.c:2
const string LIQUID_SOURCE_SELECTION
Определения ActionConstants.c:180
Определения ActionConstants.c:176
array< int > TIntArray
Определения EnScript.c:733

Перекрестные ссылки ActionTarget() и UAMisc::LIQUID_SOURCE_SELECTION.