DayZ 1.24
Loading...
Searching...
No Matches
SKS_Bayonet.c
Go to the documentation of this file.
1class SKS_Bayonet extends Inventory_Base
2{
3 override bool IsMeleeFinisher()
4 {
5 return true;
6 }
7
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
52}
ActionSkinningCB ActionContinuousBaseCB ActionSkinning()
void AddAction(typename actionName)
override void OnWasDetached(EntityAI parent, int slot_id)
Definition SKS_Bayonet.c:29
override void OnWasAttached(EntityAI parent, int slot_id)
Definition SKS_Bayonet.c:21
override bool IsMeleeFinisher()
Definition SKS_Bayonet.c:3
override array< int > GetValidFinishers()
Definition SKS_Bayonet.c:8
override bool CanPutAsAttachment(EntityAI parent)
Definition SKS_Bayonet.c:13
override void SetActions()
Definition SKS_Bayonet.c:37