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

◆ ActionCondition()

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

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

30 {
31 EntityAI tgt_entity = EntityAI.Cast( target.GetObject() );
32
33 if ( tgt_entity && BaseBuildingBase.Cast(tgt_entity) &&!tgt_entity.IsBeingPlaced() )
34 {
35 string component_name = tgt_entity.GetActionComponentName( target.GetComponentIndex() );
36
37 /*if (!tgt_entity.GetInventory().HasInventorySlot(InventorySlots.GetSlotIdFromString(component_name)))
38 return false;*/
39
40 ItemBase attachment = ItemBase.Cast(tgt_entity.FindAttachmentBySlotName(component_name));
41
42 if ( attachment && player.GetInventory().CanAddEntityIntoInventory(attachment) && attachment.IsTakeable() )
43 {
44 return true;
45 }
46 }
47 return false;
48 }
class LogManager EntityAI
void BaseBuildingBase()
Определения BaseBuildingBase.c:1328
class GP5GasMask extends MaskBase ItemBase
override bool IsTakeable()
Определения BaseBuildingBase.c:988

Перекрестные ссылки ActionTarget и ItemBase::IsTakeable().