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.
Ammo_40mm_Base EEParentedTo
override void OnDamageDestroyed(int oldLevel)
override bool IsInventoryVisible()
override bool IsTakeable()
override bool ShootsExplosiveAmmo()
override void EEKilled(Object killer)
override void OnActivatedByItem(notnull ItemBase item)
override void OnDamageDestroyed(int oldLevel)
void Ammo_40mm_Smoke_ColorBase()
override void EEKilled(Object killer)
special behaviour - do not call super
override bool CanPutInCargo(EntityAI parent)
override void EEDelete(EntityAI parent)
override void OnActivatedByItem(notnull ItemBase item)
override void OnVariablesSynchronized()
override bool IsAmmoPile()
override void SetFromProjectile(ProjectileStoppedInfo info)
override void SetQuantityToMinimum()
float GetWeightSpecialized(bool forceRecalc=false)
static float GetAmmoWeightByBulletType(string bulletType)
static ref map< string, float > m_AmmoWeightByBulletType
void RemoveArrow(EntityAI arrow)
void AddArrow(EntityAI arrow)
override bool IsInventoryVisible()
override void EEParentedFrom(EntityAI parent)
override void EEParentedTo(EntityAI parent)
override bool CanBeActionTarget()
Legacy way of using particles in the game.
static int GetParticleIDByName(string name)
Returns particle's ID based on the filename (without .ptc suffix).
static const int BOLT_CUPID_HIT
static const int GRENADE_CHEM_BREAK
proto native float GetProjectileDamage()
proto native string GetAmmoType()
void SetCalcDetails(string details)
DamageType
exposed from C++ (do not change)
class GP5GasMask extends MaskBase ItemBase
static proto float Max(float x, float y)
Returns bigger of two given values.
vector GetPosition()
Get the world position of the Effect.
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor).