58 if ( (action_data.
m_MainItem && action_data.
m_MainItem.IsDamageDestroyed()) || targetObject.IsDamageDestroyed() )
76 targetObject.DecreaseHealth(
"",
"", damage, targetObject.CanBeAutoDeleted());
85 if ( targetObject.IsDamageDestroyed() )
97 if (target_woodbase.GetSecondaryOutput() !=
"")
98 CreateSecondaryItems(action_data,target_woodbase.GetSecondaryOutput(),target_woodbase.GetSecondaryDropsAmount());
103 targetObject.OnTreeCutDown( action_data.
m_MainItem );
107 targetObject.OnTreeCutDown( action_data.
m_Player );
173 increment -= stack_max -
m_MinedItem[i].GetQuantity();
174 if (increment >= 1.0)
195 if (material_secondary ==
"" || quantity_secondary <= 0)
207 int increment = quantity_secondary;
211 stacks_amount =
Math.
Ceil(increment/stack_max);
213 for (
int i = 0; i < stacks_amount; i++)
215 if (increment > stack_max)
218 increment -= stack_max;
231 if ( gloves && !gloves.IsDamageDestroyed() )
241 if ( rand == 0 && !player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"LeftForeArmRoll") )
243 player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"RightForeArmRoll");
245 else if ( rand == 1 && !player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"RightForeArmRoll") )
247 player.GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"LeftForeArmRoll");
const int ECE_PLACE_ON_SURFACE
ref ActionTarget m_Target
void SetACData(Param units)
protected ActionBase m_Action
void OnCompletePogress(ActionData action_data)
protected ref map< string, int > m_MaterialAndQuantityMap
protected ItemBase m_SecondaryItem
protected int m_AmountOfDrops
void CreatePrimaryItems(ActionData action_data)
bool GetMiningData(ActionData action_data)
protected bool m_DataLoaded
protected float m_TimeToComplete
protected float m_AdjustedTimeBetweenMaterialDrops
protected float m_DamageToMiningItemEachDrop
override int Execute(ActionData action_data)
void CreateSecondaryItems(ActionData action_data, string material_secondary="", int quantity_secondary=-1)
protected float m_TimeBetweenMaterialDrops
override float GetProgress()
protected const int MINEDITEM_MAX
void CAContinuousMineWood(float time_between_drops)
protected float m_AdjustedDamageToMiningItemEachDrop
protected ref Param1< float > m_SpentUnits
protected float m_TimeElpased
protected ItemBase m_MinedItem[MINEDITEM_MAX]
void DamagePlayersHands(PlayerBase player)
protected float m_CycleTimeOverride
override void Setup(ActionData action_data)
protected int m_CurrentAssumedDrops
Super root of all classes in Enforce script.
EHarvestType m_HarvestType
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
static proto float Ceil(float f)
Returns ceil of value.