Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
improvisedsuppressor.c
Go to the documentation of this file.
1
class
ImprovisedSuppressor
extends
SuppressorBase
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))
13
return
false
;
14
15
for
(
int
i = 0; i <
SLOTS_ARRAY
; i++ )
16
{
17
if
(parent.IsSlotReserved(
InventorySlots
.
GetSlotIdFromString
(
slot_names
[i])))
18
{
19
cond_state =
false
;
20
break
;
21
}
22
23
if
( parent.FindAttachmentBySlotName(
slot_names
[i]) != NULL )
24
{
25
cond_state =
false
;
26
break
;
27
}
28
}
29
30
if
( cond_state && !parent.IsKindOf(
"PlateCarrierHolster"
) && !parent.IsKindOf(
"PlateCarrierComplete"
) && !parent.IsKindOf(
"CarrierHolsterSolo"
) && !parent.IsKindOf(
"ChestHolster"
) )
31
{
32
return
true
;
33
}
34
return
false
;
35
}
36
}
EntityAI
Definition
inventoryitem.c:2
InventorySlots
provides access to slot configuration
Definition
inventoryslots.c:6
InventorySlots::GetSlotIdFromString
static proto native int GetSlotIdFromString(string slot_name)
SuppressorBase
Definition
groza_barrel_grip.c:2
SuppressorBase::slot_names
string slot_names[SLOTS_ARRAY]
Definition
improvisedsuppressor.c:6
SuppressorBase::SLOTS_ARRAY
const int SLOTS_ARRAY
Definition
improvisedsuppressor.c:4
SuppressorBase::CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition
improvisedsuppressor.c:9
Games
Dayz
scripts
4_world
entities
itembase
suppressorbase
improvisedsuppressor.c
Generated by
1.17.0