DayZ
1.24
Loading...
Searching...
No Matches
SKS_Bayonet.c
Go to the documentation of this file.
1
class
SKS_Bayonet
extends
Inventory_Base
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(
"weaponMuzzle"
) ==
null
)
17
return
true
;
18
return
false
;
19
}
20
21
override
void
OnWasAttached
(
EntityAI
parent,
int
slot_id
)
22
{
23
super
.OnWasAttached(parent,
slot_id
);
24
25
if
(parent.IsWeapon())
26
parent.SetBayonetAttached(
true
,
slot_id
);
27
}
28
29
override
void
OnWasDetached
(
EntityAI
parent,
int
slot_id
)
30
{
31
super
.OnWasDetached(parent,
slot_id
);
32
33
if
(parent.IsWeapon())
34
parent.SetBayonetAttached(
false
);
35
}
36
37
override
void
SetActions
()
38
{
39
super
.SetActions();
40
41
AddAction
(
ActionBurnSewTarget
);
42
AddAction
(
ActionUnrestrainTarget
);
43
AddAction
(
ActionSkinning
);
44
AddAction
(
ActionMineBush
);
45
AddAction
(
ActionMineTreeBark
);
46
AddAction
(
ActionBurnSewSelf
);
47
AddAction
(
ActionDigWorms
);
48
AddAction
(
ActionShaveTarget
);
49
AddAction
(
ActionShave
);
50
AddAction
(
ActionCraftBolts
);
51
}
52
}
ActionSkinning
ActionSkinningCB ActionContinuousBaseCB ActionSkinning()
Definition
ActionSkinning.c:31
AddAction
void AddAction(typename actionName)
Definition
AdvancedCommunication.c:212
EMeleeHitType
EMeleeHitType
Definition
DayZPlayerImplementMeleeCombat.c:2
ActionBurnSewSelf
Definition
ActionBurnSewSelf.c:10
ActionBurnSewTarget
Definition
ActionBurnSewTarget.c:10
ActionCraftBolts
Definition
ActionCraftBolts.c:12
ActionDigWorms
Definition
ActionDigWorms.c:15
ActionMineBush
Definition
ActionMineBush.c:12
ActionMineTreeBark
Definition
ActionMineTreeBark.c:2
ActionShave
Definition
ActionShave.c:10
ActionShaveTarget
Definition
ActionShaveTarget.c:10
ActionUnrestrainTarget
Definition
ActionUnrestrainTarget.c:52
EntityAI
Definition
Building.c:6
Inventory_Base
Definition
BarbedBaseballBat.c:2
Inventory_Base::OnWasDetached
override void OnWasDetached(EntityAI parent, int slot_id)
Definition
SKS_Bayonet.c:29
Inventory_Base::OnWasAttached
override void OnWasAttached(EntityAI parent, int slot_id)
Definition
SKS_Bayonet.c:21
Inventory_Base::IsMeleeFinisher
override bool IsMeleeFinisher()
Definition
SKS_Bayonet.c:3
Inventory_Base::GetValidFinishers
override array< int > GetValidFinishers()
Definition
SKS_Bayonet.c:8
Inventory_Base::CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition
SKS_Bayonet.c:13
Inventory_Base::SetActions
override void SetActions()
Definition
SKS_Bayonet.c:37
Param3
Definition
EntityAI.c:95
scripts
4_World
Entities
ItemBase
Inventory_Base
SKS_Bayonet.c
Generated by
1.10.0