DayZ
1.24
Loading...
Searching...
No Matches
AmmoTypes.c
Go to the documentation of this file.
1
class
AmmoTypesAPI
2
{
3
private
void
AmmoTypesAPI
() {}
4
private
void
~AmmoTypesAPI
() {}
5
7
static
proto
bool
Exists
(
string
ammoType
);
9
static
proto
bool
GetAmmoType
(
string
magazineType
,
out
string
ammoType
);
10
12
static
bool
MagazineTypeToAmmoType
(
string
magazineType
,
out
string
ammoType
)
13
{
14
if
(!
AmmoTypesAPI
.
Exists
(
magazineType
))
15
{
16
if
(!
AmmoTypesAPI
.
GetAmmoType
(
magazineType
,
ammoType
))
17
{
18
ErrorEx
(
string
.Format(
"%1 is not a magazineType or ammoType or has no default 'ammo' set up in config."
,
magazineType
));
19
return
false
;
20
}
21
return
true
;
22
}
23
else
24
{
25
// This is already an ammoType
26
ammoType
=
magazineType
;
27
return
true
;
28
}
29
}
30
}
AmmoTypesAPI
Definition
AmmoTypes.c:2
AmmoTypesAPI::Exists
static proto bool Exists(string ammoType)
Check if ammoType exists (registered in cfgAmmoTypes)
AmmoTypesAPI::AmmoTypesAPI
void AmmoTypesAPI()
Definition
AmmoTypes.c:3
AmmoTypesAPI::GetAmmoType
static proto bool GetAmmoType(string magazineType, out string ammoType)
Get the default ammoType of a magazine.
AmmoTypesAPI::~AmmoTypesAPI
void ~AmmoTypesAPI()
Definition
AmmoTypes.c:4
AmmoTypesAPI::MagazineTypeToAmmoType
static bool MagazineTypeToAmmoType(string magazineType, out string ammoType)
Helper method.
Definition
AmmoTypes.c:12
Param3
Definition
EntityAI.c:95
ErrorEx
enum ShapeType ErrorEx
scripts
3_Game
Global
AmmoTypes.c
Generated by
1.10.0