DayZ 1.24
Loading...
Searching...
No Matches
Mosin_Bayonet.c
Go to the documentation of this file.
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("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
46}
void AddAction(typename actionName)
override void OnWasDetached(EntityAI parent, int slot_id)
override void OnWasAttached(EntityAI parent, int slot_id)
override bool IsMeleeFinisher()
override array< int > GetValidFinishers()
override bool CanPutAsAttachment(EntityAI parent)
override void SetActions()