20 ErrorEx(
"empty 'spawnPileType' for bullet type:" + bulletType);
42 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
45 data.
SetCalcDetails(
"TAmmo: ("+GetAmmoCount()+
"(Ammo count) * "+ GetConfigWeightModifiedDebugText());
49 return GetAmmoCount() * GetConfigWeightModified();
54 ServerSetAmmoCount(1);
61 float health =
Math.
Max(1 - totalDmg, 0);
64 SetHealth01(
"",
"", health);
68 SetCartridgeDamageAtIndex(0, totalDmg);
100 if (super.CanBeActionTarget())
105 return !parent.IsManagingArrows();
163 return GetAnimationPhase(
"Visibility") == 0;
168 if (!super.IsInventoryVisible())
188 DamageSystem.ExplosionDamage(
this, null,
"Explosion_40mm_Ammo", item.GetPosition(),
DamageType.EXPLOSION);
194 super.EEKilled(killer);
195 DamageSystem.ExplosionDamage(
this, null,
"Explosion_40mm_Ammo",
GetPosition(),
DamageType.EXPLOSION);
201 super.OnDamageDestroyed(oldLevel);
208class Ammo_40mm_ChemGas: Ammo_40mm_Base
220 super.EEKilled(killer);
227 super.OnDamageDestroyed(oldLevel);
247 RegisterNetSyncVariableBool(
"m_Activated");
252 super.OnVariablesSynchronized();
293 super.EEDelete(parent);
303 SetHealth(
"",
"", 0.0);
eBleedingSourceType GetType()
void AddAction(typename actionName)
override bool IsInventoryVisible()
Ammo_ImprovisedBolt_2 Bolt_Base IsTakeable()
override void OnDamageDestroyed(int oldLevel)
DamageType
exposed from C++ (do not change)
override void EEKilled(Object killer)
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
override void OnActivatedByItem(notnull ItemBase item)
Called when this item is activated by other.
class JsonUndergroundAreaTriggerData GetPosition
override bool ShootsExplosiveAmmo()
override void EEKilled(Object killer)
override void OnActivatedByItem(notnull ItemBase item)
override void OnDamageDestroyed(int oldLevel)
void Ammo_40mm_Smoke_ColorBase()
protected float m_ParticleLifetime
override void EEKilled(Object killer)
special behaviour - do not call super
override bool CanPutInCargo(EntityAI parent)
override void EEDelete(EntityAI parent)
protected void Activate()
protected int m_ParticleId
protected Particle m_ParticleSmoke
override void OnActivatedByItem(notnull ItemBase item)
override void OnVariablesSynchronized()
protected bool m_Activated
override protected float GetWeightSpecialized(bool forceRecalc=false)
override bool IsAmmoPile()
override void SetFromProjectile(ProjectileStoppedInfo info)
override void SetQuantityToMinimum()
static float GetAmmoWeightByBulletType(string bulletType)
static ref map< string, float > m_AmmoWeightByBulletType
override void SetActions()
void OnEntityKilled(Object killer, EntityAI target)
void RemoveArrow(EntityAI arrow)
void AddArrow(EntityAI arrow)
override bool IsInventoryVisible()
override void EEParentedFrom(EntityAI parent)
override void EEParentedTo(EntityAI parent)
override bool CanBeActionTarget()
AnalyticsManagerServer GetAnalyticsServer()
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native Object CreateObject(string type, vector pos, bool create_local=false, bool init_ai=false, bool create_physics=true)
Creates object of certain type.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
override ScriptCallQueue GetCallQueue(int call_category)
string ConfigGetTextOut(string path)
Get string value from config on path.
Legacy way of using particles in the game.
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
void SetWiggle(float random_angle, float random_interval)
Makes the particle change direction by random_angle every random_interval seconds.
static int GetParticleIDByName(string name)
Returns particle's ID based on the filename (without .ptc suffix)
static const int GRENADE_CHEM_BREAK
proto native float GetProjectileDamage()
proto native string GetAmmoType()
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
void SetCalcDetails(string details)
proto native CGame GetGame()
static proto float Max(float x, float y)
Returns bigger of two given values.