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

◆ CanPutAsAttachment() [2/2]

override bool Switchable_Base::CanPutAsAttachment ( EntityAI parent)
inlineprivate

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

26 {
27 if ( !super.CanPutAsAttachment(parent) ) {return false;}
28
29 bool req_attachment = false;
30 bool rail_attachment_found = false;
31 int slot_id;
32 ItemBase attachment;
33 for ( int i = 0; i < parent.GetInventory().GetAttachmentSlotsCount(); i++ )
34 {
35 slot_id = parent.GetInventory().GetAttachmentSlotId(i);
36 if ( m_AttachmentSlotsCheck.Find(slot_id) != -1 )
37 {
38 req_attachment = true;
39 attachment = ItemBase.Cast(parent.GetInventory().FindAttachment(slot_id));
40 if ( attachment && attachment.ConfigIsExisting("hasRailFunctionality") && attachment.ConfigGetBool("hasRailFunctionality") )
41 rail_attachment_found = true;
42 }
43 }
44 return !req_attachment || (req_attachment && rail_attachment_found);
45 }
class GP5GasMask extends MaskBase ItemBase
ref array< int > m_AttachmentSlotsCheck
Определения UniversalLight.c:13

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