DayZ
1.24
Loading...
Searching...
No Matches
Mosin_Bayonet.c
Go to the documentation of this file.
1
class
Mosin_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(
"weaponMuzzleMosin"
) ==
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
(
ActionBurnSewSelf
);
44
AddAction
(
ActionDigWorms
);
45
}
46
}
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
ActionDigWorms
Definition
ActionDigWorms.c:15
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
Mosin_Bayonet.c:29
Inventory_Base::OnWasAttached
override void OnWasAttached(EntityAI parent, int slot_id)
Definition
Mosin_Bayonet.c:21
Inventory_Base::IsMeleeFinisher
override bool IsMeleeFinisher()
Definition
Mosin_Bayonet.c:3
Inventory_Base::GetValidFinishers
override array< int > GetValidFinishers()
Definition
Mosin_Bayonet.c:8
Inventory_Base::CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition
Mosin_Bayonet.c:13
Inventory_Base::SetActions
override void SetActions()
Definition
Mosin_Bayonet.c:37
Param3
Definition
EntityAI.c:95
scripts
4_World
Entities
ItemBase
Inventory_Base
Mosin_Bayonet.c
Generated by
1.10.0