Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
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 
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  {
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 
51  }
52 }
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
ActionBurnSewSelf
Definition: actionburnsewself.c:9
CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition: itembase.c:4021
ActionDigWorms
Definition: actiondigworms.c:14
AddAction
void AddAction(typename actionName)
Definition: advancedcommunication.c:86
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
Inventory_Base
Definition: barbedbaseballbat.c:1
EntityAI
Definition: building.c:5