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

◆ ActionCondition()

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

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

34 {
35 Switchable_Base light;
36 Mich2001Helmet helmet;
37 helmet = Mich2001Helmet.Cast(target.GetObject());
38 if ( !helmet )
39 return false;
40 light = Switchable_Base.Cast(helmet.FindAttachmentBySlotName("helmetFlashlight"));
41 if ( !light )
42 return false;
43
44 if ( light.HasEnergyManager() && light.GetCompEM().CanSwitchOn() && light.GetCompEM().CanWork() ) //TODO review conditions for turning off
45 {
46 return true;
47 }
48
49 return false;
50 }

Перекрестные ссылки ActionTarget.