16 g_Game.ConfigGetText(
string.Format(
"CfgAmmo %1 spawnPileType", bulletType) , ammoTypeName);
18 ammoWeight =
g_Game.ConfigGetFloat(
string.Format(
"CfgMagazines %1 weight", ammoTypeName));
20 ErrorEx(
"empty 'spawnPileType' for bullet type:" + bulletType);
35 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
38 data.
SetCalcDetails(
"TAmmo: ("+GetAmmoCount()+
"(Ammo count) * "+ GetConfigWeightModifiedDebugText());
42 return GetAmmoCount() * GetConfigWeightModified();
47 ServerSetAmmoCount(1);
52 float dmgPerUse =
g_Game.ConfigGetFloat(
"cfgAmmo " + info.
GetAmmoType() +
" dmgPerUse");
54 float health =
Math.
Max(1 - totalDmg, 0);
57 SetHealth01(
"",
"", health);
61 SetCartridgeDamageAtIndex(0, totalDmg);
93 if (super.CanBeActionTarget())
98 return !parent.IsManagingArrows();
171 return GetAnimationPhase(
"Visibility") == 0;
176 if (!super.IsInventoryVisible())
196 DamageSystem.ExplosionDamage(
this, null,
"Explosion_40mm_Ammo", item.GetPosition(),
DamageType.EXPLOSION);
202 super.EEKilled(killer);
203 DamageSystem.ExplosionDamage(
this, null,
"Explosion_40mm_Ammo",
GetPosition(),
DamageType.EXPLOSION);
209 super.OnDamageDestroyed(oldLevel);
222 g_Game.CreateObject(
"ContaminatedArea_Local", item.GetPosition());
235 super.OnDamageDestroyed(oldLevel);
255 RegisterNetSyncVariableBool(
"m_Activated");
260 super.OnVariablesSynchronized();
265 string particleStrIdentifier =
g_Game.ConfigGetTextOut(
string.Format(
"CfgMagazines %1 particleStrIdentifier",
GetType()));
289 g_Game.GetAnalyticsServer().OnEntityKilled(killer,
this);
301 super.EEDelete(parent);
311 SetHealth(
"",
"", 0.0);
eBleedingSourceType GetType()
void AddAction(typename actionName)
static void PlayOnHitParticle(vector position)
Ammo_HuntingBolt Bolt_Base SetActions()
override void EEKilled(Object killer)
Ammo_40mm_Explosive Ammo_40mm_Base OnActivatedByItem(notnull ItemBase item)
Called when this item is activated by other.
override void OnDamageDestroyed(int oldLevel)
Ammo_40mm_Base EEParentedTo
DamageType
exposed from C++ (do not change)
class GP5GasMask extends MaskBase ItemBase
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
override bool IsTakeable()
override bool IsInventoryVisible()
override bool ShootsExplosiveAmmo()
override void EEKilled(Object killer)
override void OnActivatedByItem(notnull ItemBase item)
override void OnDamageDestroyed(int oldLevel)
override void OnActivatedByItem(notnull ItemBase item)
override void EEKilled(Object killer)
special behaviour - do not call super
override bool CanPutInCargo(EntityAI parent)
override void OnVariablesSynchronized()
void Ammo_40mm_Smoke_ColorBase()
override void EEDelete(EntityAI parent)
override void SetFromProjectile(ProjectileStoppedInfo info)
static float GetAmmoWeightByBulletType(string bulletType)
float GetWeightSpecialized(bool forceRecalc=false)
override bool IsAmmoPile()
static ref map< string, float > m_AmmoWeightByBulletType
override void SetQuantityToMinimum()
void RemoveArrow(EntityAI arrow)
void AddArrow(EntityAI arrow)
override void EEParentedTo(EntityAI parent)
override bool IsInventoryVisible()
override bool CanBeActionTarget()
override void EEParentedFrom(EntityAI parent)
Legacy way of using particles in the game.
static const int BOLT_CUPID_HIT
static int GetParticleIDByName(string name)
Returns particle's ID based on the filename (without .ptc suffix)
static const int GRENADE_CHEM_BREAK
proto native string GetAmmoType()
proto native float GetProjectileDamage()
void SetCalcDetails(string details)
static proto float Max(float x, float y)
Returns bigger of two given values.
vector GetPosition()
Get the world position of the Effect.