Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс Ammunition_Base

ammo pile base Подробнее...

+ Граф наследования:Ammunition_Base:

Защищенные члены

float GetWeightSpecialized (bool forceRecalc=false)
 
override void SetQuantityToMinimum ()
 
override void SetFromProjectile (ProjectileStoppedInfo info)
 

Закрытые члены

override void SetActions ()
 
override bool IsAmmoPile ()
 

Закрытые статические члены

static float GetAmmoWeightByBulletType (string bulletType)
 

Закрытые статические данные

static ref map< string, floatm_AmmoWeightByBulletType = new map<string, float>()
 

Подробное описание

ammo pile base

Методы

◆ GetAmmoWeightByBulletType()

static float GetAmmoWeightByBulletType ( string bulletType)
inlinestaticprivate
7 {
9 {
11 }
12 else
13 {
14 float ammoWeight;
15 string ammoTypeName;
16 GetGame().ConfigGetText( string.Format("CfgAmmo %1 spawnPileType", bulletType) , ammoTypeName);
17 if (ammoTypeName)
18 ammoWeight = GetGame().ConfigGetFloat(string.Format("CfgMagazines %1 weight", ammoTypeName));
19 else
20 ErrorEx("empty 'spawnPileType' for bullet type:" + bulletType);
21 if (ammoWeight)
23 return ammoWeight;
24 }
25 }
static ref map< string, float > m_AmmoWeightByBulletType
Definition AmmunitionPiles.c:4
Definition EntityAI.c:95
proto native CGame GetGame()
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, GetGame() и m_AmmoWeightByBulletType.

Используется в Weapon::GetWeightSpecialized().

◆ GetWeightSpecialized()

float GetWeightSpecialized ( bool forceRecalc = false)
inlineprotected
40 {
41 #ifdef DEVELOPER
42 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
43 {
44 WeightDebugData data = WeightDebug.GetWeightDebug(this);
45 data.SetCalcDetails("TAmmo: ("+GetAmmoCount()+"(Ammo count) * "+ GetConfigWeightModifiedDebugText());
46 }
47 #endif
48
49 return GetAmmoCount() * GetConfigWeightModified();
50 }
Definition Debug.c:940

◆ IsAmmoPile()

override bool IsAmmoPile ( )
inlineprivate
35 {
36 return true;
37 }

◆ SetActions()

override void SetActions ( )
inlineprivate
28 {
29 super.SetActions();
30
32 }
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220
Definition ActionSortAmmoPile.c:10

Перекрестные ссылки AddAction().

◆ SetFromProjectile()

override void SetFromProjectile ( ProjectileStoppedInfo info)
inlineprotected
58 {
59 float dmgPerUse = GetGame().ConfigGetFloat("cfgAmmo " + info.GetAmmoType() + " dmgPerUse");
60 float totalDmg = info.GetProjectileDamage() + dmgPerUse;
61 float health = Math.Max(1 - totalDmg, 0);
62
64 SetHealth01("","", health);
65
66 // SetCartridgeDamageAtIndex() MUST be called AFTER SetHealth01()!!
67 // otherwise, decreasing health by less than an entire health level get ignored
69 }
override void SetQuantityToMinimum()
Definition AmmunitionPiles.c:52
Definition EnMath.c:7
static proto float Max(float x, float y)
Returns bigger of two given values.

Перекрестные ссылки GetGame(), Math::Max() и SetQuantityToMinimum().

◆ SetQuantityToMinimum()

override void SetQuantityToMinimum ( )
inlineprotected
53 {
55 }

Используется в SetFromProjectile().

Поля

◆ m_AmmoWeightByBulletType

ref map<string, float> m_AmmoWeightByBulletType = new map<string, float>()
staticprivate

Используется в GetAmmoWeightByBulletType().


Объявления и описания членов класса находятся в файле: