Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
m9a1_bayonet.c
Go to the documentation of this file.
1
class
M9A1_Bayonet
extends
ToolBase
2
{
3
override
bool
IsMeleeFinisher()
4
{
5
return
true
;
6
}
7
8
override
array<int>
GetValidFinishers
()
9
{
10
return
{
EMeleeHitType
.FINISHER_LIVERSTAB,
EMeleeHitType
.FINISHER_NECKSTAB};
11
}
12
13
override
bool
CanPutAsAttachment
(
EntityAI
parent )
14
{
15
if
(!super.CanPutAsAttachment(parent)) {
return
false
;}
16
if
( parent.FindAttachmentBySlotName(
"suppressorImpro"
) ==
null
&& parent.FindAttachmentBySlotName(
"weaponMuzzleM4"
) ==
null
)
17
{
18
return
true
;
19
}
20
return
false
;
21
}
22
23
override
void
OnWasAttached
(
EntityAI
parent,
int
slot_id)
24
{
25
super.OnWasAttached(parent, slot_id);
26
27
if
( parent.IsWeapon() )
28
{
29
parent.SetBayonetAttached(
true
,slot_id);
30
}
31
}
32
33
override
void
OnWasDetached
(
EntityAI
parent,
int
slot_id)
34
{
35
super.OnWasDetached(parent, slot_id);
36
37
if
( parent.IsWeapon() )
38
{
39
parent.SetBayonetAttached(
false
);
40
}
41
}
42
43
override
void
SetActions
()
44
{
45
super.SetActions();
46
47
AddAction
(
ActionBurnSewTarget
);
48
AddAction
(
ActionUnrestrainTarget
);
49
AddAction
(
ActionSkinning
);
50
AddAction
(
ActionMineBush
);
51
AddAction
(
ActionMineTreeBark
);
52
AddAction
(
ActionBurnSewSelf
);
53
AddAction
(
ActionDigWorms
);
54
AddAction
(
ActionShaveTarget
);
55
AddAction
(
ActionDisarmMine
);
56
AddAction
(
ActionDisarmExplosive
);
57
AddAction
(
ActionShave
);
58
AddAction
(
ActionCraftBolts
);
59
}
60
}
OnWasAttached
override void OnWasAttached(EntityAI parent, int slot_id)
Definition:
torch.c:945
ActionUnrestrainTarget
Definition:
actionunrestraintarget.c:55
GetValidFinishers
array< int > GetValidFinishers()
returns an array of possible finishers
Definition:
itembase.c:4618
ActionDisarmExplosive
ActionDisarmExplosiveCB ActionContinuousBaseCB ActionDisarmExplosive()
Definition:
actiondisarmexplosive.c:11
ActionBurnSewSelf
Definition:
actionburnsewself.c:9
ActionShaveTarget
Definition:
actionshavetarget.c:9
ActionDisarmMine
ActionDisinfectPlantCB ActionDisarmMine
CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition:
itembase.c:4021
ActionMineTreeBark
Definition:
actionminetreebark.c:1
ActionSkinning
ActionSortAmmoPileCB ActionSkinning
ActionDigWorms
Definition:
actiondigworms.c:14
ActionShave
Definition:
actionshave.c:9
AddAction
void AddAction(typename actionName)
Definition:
advancedcommunication.c:86
ToolBase
Definition:
boneknife.c:1
SetActions
void SetActions()
Definition:
advancedcommunication.c:79
OnWasDetached
override void OnWasDetached(EntityAI parent, int slot_id)
Definition:
remotedetonator.c:237
ActionBurnSewTarget
Definition:
actionburnsewtarget.c:9
EMeleeHitType
EMeleeHitType
Definition:
dayzplayerimplementmeleecombat.c:1
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition:
isboxcollidinggeometryproxyclasses.c:27
ActionMineBush
Definition:
actionminebush.c:11
EntityAI
Definition:
building.c:5
ActionCraftBolts
Definition:
actioncraftbolts.c:11
DAYZ
scripts_v1.24.157551
scripts
world
entities
itembase
inventory_base
m9a1_bayonet.c
Generated by
1.8.17