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