Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
atlasbipod.c
Go to the documentation of this file.
1 class AtlasBipod extends Inventory_Base
2 {
3  override bool CanPutAsAttachment( EntityAI parent )
4  {
5  if(!super.CanPutAsAttachment(parent)) {return false;}
6  bool m4_hndgrd = false;
7  bool ak_hndgrd = false;
8 
9  if ( parent.FindAttachmentBySlotName("weaponHandguardM4") != NULL )
10  {
11  m4_hndgrd = parent.FindAttachmentBySlotName("weaponHandguardM4").IsKindOf("M4_RISHndgrd");
12  }
13 
14  if ( parent.FindAttachmentBySlotName("weaponHandguardAK") != NULL )
15  {
16  ak_hndgrd = parent.FindAttachmentBySlotName("weaponHandguardAK").IsKindOf("AK_RailHndgrd");
17  }
18 
19  if ( m4_hndgrd || ak_hndgrd )
20  {
21  return true;
22  }
23 
24  return false;
25  }
26 
27  override bool CanDetachAttachment( EntityAI attachment )
28  {
29  return false;
30  }
31 }
CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition: itembase.c:4021
Inventory_Base
Definition: barbedbaseballbat.c:1
EntityAI
Definition: building.c:5