Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
aug.c
Go to the documentation of this file.
1class Aug_Base : RifleBoltFree_Base
2{
3 override RecoilBase SpawnRecoilObject()
4 {
5 return new AUGRecoil(this);
6 }
7
8 //Debug menu Spawn Ground Special
9 override void OnDebugSpawn()
10 {
11 EntityAI entity;
12 if ( Class.CastTo(entity, this) )
13 {
14 entity.SpawnEntityOnGroundPos("Mag_Aug_30Rnd", entity.GetPosition());
15 }
16 }
17
18 override int GetWeaponSpecificCommand(int weaponAction ,int subCommand)
19 {
20 if ( weaponAction == WeaponActions.RELOAD)
21 {
22 switch (subCommand)
23 {
24 case WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_BULLET:
25 return WeaponActionReloadTypes.RELOADSRIFLE_MAGAZINE_BULLET;
26
27 case WeaponActionReloadTypes.RELOADRIFLE_NOMAGAZINE_BULLET:
28 return WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_BULLET;
29
30 case WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_NOBULLET:
31 return WeaponActionReloadTypes.RELOADSRIFLE_MAGAZINE_NOBULLET;
32
33 case WeaponActionReloadTypes.RELOADRIFLE_NOMAGAZINE_NOBULLET:
34 return WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_NOBULLET;
35
36 default:
37 return subCommand;
38 }
39
40 }
41 return subCommand;
42 }
43};
44
45class Aug extends Aug_Base
46{
47 //Debug menu Spawn Ground Special
48 override void OnDebugSpawn()
49 {
50 GameInventory inventory = GetInventory();
51
52 inventory.CreateInInventory( "UniversalLight" );
53 inventory.CreateInInventory( "Battery9V" );
54 inventory.CreateInInventory( "ACOGOptic" );
55 inventory.CreateInInventory( "M4_Suppressor" );
56
57 SpawnAttachedMagazine("Mag_Aug_30Rnd");
58 }
59}
60
61class AugShort extends Aug_Base
62{
63 override bool CanEnterIronsights()
64 {
65 return true;
66 }
67
68 override void AssembleGun()
69 {
70 super.AssembleGun();
71
72 if ( !FindAttachmentBySlotName("weaponOpticsAug") )
73 {
74 GetInventory().CreateAttachment("AugOptic");
75 }
76 }
77
78 //Debug menu Spawn Ground Special
79 override void OnDebugSpawn()
80 {
81 SpawnAttachedMagazine("Mag_Aug_30Rnd");
82 }
83}
84
85
87{
88 override bool CanPutAsAttachment( EntityAI parent )
89 {
90 return true;
91 }
92};
override void AssembleGun()
Definition aug.c:68
AugOptic CanEnterIronsights
Definition aug.c:63
Definition aug.c:2
Definition aug.c:87
Super root of all classes in Enforce script.
Definition enscript.c:11
script counterpart to engine's class Inventory
Definition inventory.c:79
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
Definition inventory.c:874
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn