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

◆ ActionCondition()

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

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

10 {
11 Object target_object = target.GetObject();
12
13 if ( player && target_object )
14 {
15 EntityAI target_entity = EntityAI.Cast( target.GetObject() );
16 string selection = target_object.GetActionComponentName( target.GetComponentIndex() );
17
18
19 if ( target_entity && target_entity.GetInventory() && target_entity.GetInventory().AttachmentCount() > 0 && selection == "power_source" ) //has any power source attachment attached
20 {
21 return true;
22 }
23 }
24
25 return false;
26 }
class LogManager EntityAI
class LOD Object

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