DayZ 1.24
Loading...
Searching...
No Matches
ImprovisedSuppressor.c
Go to the documentation of this file.
2{
3
4 const int SLOTS_ARRAY = 9;
5
6 string slot_names[SLOTS_ARRAY] = { /*"weaponMuzzleAK", */"weaponBayonetAK", "weaponBayonet", "weaponBayonetMosin", "weaponBayonetSKS",/* "weaponMuzzleM4",*/ "weaponMuzzleMosin", /*"pistolMuzzle",*/ "weaponMuzzleMP5" };
7
8
9 override bool CanPutAsAttachment(EntityAI parent)
10 {
11 bool cond_state = true;
12 if (!super.CanPutAsAttachment(parent)) return false;
13 for (int i = 0; i < SLOTS_ARRAY ; i++)
14 {
15 if (parent.FindAttachmentBySlotName(slot_names[i]) != NULL)
16 {
17 cond_state = false;
18 break;
19 }
20 }
21
22 if (cond_state && !parent.IsKindOf("PlateCarrierHolster") && !parent.IsKindOf("PlateCarrierComplete") && !parent.IsKindOf("CarrierHolsterSolo") && !parent.IsKindOf("ChestHolster"))
23 return true;
24 return false;
25 }
26}
override bool CanPutAsAttachment(EntityAI parent)