Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
aug.c
Go to the documentation of this file.
1
class
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
45
class
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
61
class
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
86
class
AugOptic
:
ItemOptics
87
{
88
override
bool
CanPutAsAttachment
(
EntityAI
parent )
89
{
90
return
true
;
91
}
92
};
AssembleGun
override void AssembleGun()
Definition
aug.c:68
CanEnterIronsights
AugOptic CanEnterIronsights
Definition
aug.c:63
AUGRecoil
Definition
augrecoil.c:2
Aug_Base
Definition
aug.c:2
Aug_Base::OnDebugSpawn
override void OnDebugSpawn()
Definition
aug.c:9
Aug_Base::SpawnRecoilObject
override RecoilBase SpawnRecoilObject()
Definition
aug.c:3
Aug_Base::GetWeaponSpecificCommand
override int GetWeaponSpecificCommand(int weaponAction, int subCommand)
Definition
aug.c:18
AugOptic
Definition
aug.c:87
AugOptic::CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition
aug.c:88
Class
Super root of all classes in Enforce script.
Definition
enscript.c:11
EntityAI
Definition
inventoryitem.c:2
GameInventory
script counterpart to engine's class Inventory
Definition
inventory.c:81
GameInventory::CreateInInventory
EntityAI CreateInInventory(string type)
Definition
inventory.c:876
ItemOptics::ItemOptics
void ItemOptics()
Definition
itemoptics.c:19
RecoilBase
Definition
recoilbase.c:2
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
WeaponActions
WeaponActions
actions
Definition
human.c:816
WeaponActionReloadTypes
WeaponActionReloadTypes
action types reload action types
Definition
human.c:832
Games
Dayz
scripts
4_world
entities
firearms
automaticrifle
aug.c
Generated by
1.17.0