11 static int m_PrimaryDropsAmount = -1;
12 static int m_SecondaryDropsAmount = -1;
13 static float m_ToolDamage = -1.0;
14 static float m_CycleTimeOverride = -1.0;
15 static string m_PrimaryOutput =
"";
16 static string m_SecondaryOutput =
"";
17 static string m_BarkType =
"";
48 return ConfigGetBool(
"isCuttable");
63 return ConfigGetInt(
"primaryDropsAmount");
68 return ConfigGetInt(
"secondaryDropsAmount");
73 return ConfigGetFloat(
"toolDamage");
78 return ConfigGetFloat(
"cycleTimeOverride");
83 return ConfigGetString(
"primaryOutput");
88 return ConfigGetString(
"secondaryOutput");
93 return ConfigGetString(
"barkType");
102 if ( IsTree() && item && ( item.KindOf(
"Knife") || item.IsInherited(Screwdriver) ) )
113 if ( item && ( item.KindOf(
"Knife") || item.IsInherited(Screwdriver) ) )
117 else if ( item && item.KindOf(
"Axe") )
160 if ( IsTree() && item && ( item.KindOf(
"Knife") || item.IsInherited(Screwdriver) ) &&
GetBarkType() !=
"" )
189 if ( item && item.KindOf(
"Knife") )
193 else if ( item && item.KindOf(
"Axe") )
204 if ( item && item.KindOf(
"Knife") )
208 else if ( item && item.KindOf(
"Axe") )
258 return super.CanBeActionTarget() && !IsDamageDestroyed();
272class TreeEffecter : EffecterBase
276 private float m_RadiusSync = -1;
285 RegisterNetSyncVariableFloat(
"m_RadiusSync");
288 override void Init(
int id, EffecterParameters parameters)
290 super.Init(
id, parameters);
292 SetRadius(par.m_Radius);
295 void SetRadius(
float radius)
297 m_RadiusSync = radius;
316 GetGame().GetObjectsAtPosition(GetWorldPosition(), m_RadiusSync, objects, proxies);
318 for (
int i = 0; i < objects.Count(); i++)
325 string configPath =
"CfgNonAIVehicles " + plant.GetType() +
" FxFallingParticleEffect particle";
326 GetGame().ConfigGetText(configPath, particle);
335 LOD lod = plant.GetLODByName(
LOD.NAME_MEMORY);
336 Selection selection = lod.GetSelectionByName(
"ptcFalling");
340 for (
int j = 0; j < selection.GetVertexCount(); j++)
343 newEffect.SetParticle(particleID);
344 selectionPos = selection.GetVertexPosition(lod, j);
350 selectionPos = ModelToWorld(selectionPos);
365 case EffecterCommands.START:
366 if (effect && !effect.IsPlaying())
368 effect.SetParticle(effect.m_LastParticleID);
373 case EffecterCommands.STOP:
374 if (effect && effect.IsPlaying())
380 case EffecterCommands.REACTIVATE0:
381 case EffecterCommands.REACTIVATE1:
384 effect.SetParticle(effect.m_LastParticleID);
386 if (!effect.IsPlaying())
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySoundEnviroment(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, updating environment variables.
static int PlayInWorld(notnull Effect eff, vector pos)
Play an Effect.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
override void OnVariablesSynchronized()
void EffectParticleGeneral()
proto native CGame GetGame()
string GetSecondaryOutput()
float GetDamageToMiningItemEachDrop(ItemBase item)
int GetAmountOfDropsEx(ItemBase item, EHarvestType type)
void GetMaterialAndQuantityMapEx(ItemBase item, out map< string, int > output_map, EHarvestType type)
override bool IsCuttable()
void GetMaterialAndQuantityMap(ItemBase item, out map< string, int > output_map)
bool HasPlayerCollisionParticle()
float GetDamageToMiningItemEachDropEx(ItemBase item, EHarvestType type)
TreeEffecterParameters m_Effects
string GetPrimaryOutput()
override bool IsWoodBase()
bool HasPlayerCollisionSound()
int GetPrimaryDropsAmount()
enum EHarvestType m_IsCuttable
override bool CanBeActionTarget()
int GetSecondaryDropsAmount()
float GetCycleTimeOverride()
int GetAmountOfDrops(ItemBase item)