DayZ 1.24
Loading...
Searching...
No Matches
AmmoTypes.c
Go to the documentation of this file.
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 {
15 {
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
27 return true;
28 }
29 }
30}
static proto bool Exists(string ammoType)
Check if ammoType exists (registered in cfgAmmoTypes)
void AmmoTypesAPI()
Definition AmmoTypes.c:3
static proto bool GetAmmoType(string magazineType, out string ammoType)
Get the default ammoType of a magazine.
void ~AmmoTypesAPI()
Definition AmmoTypes.c:4
static bool MagazineTypeToAmmoType(string magazineType, out string ammoType)
Helper method.
Definition AmmoTypes.c:12
enum ShapeType ErrorEx