8 time_spent = time_spent * 1.2;
37 if (!super.Can(player, target, item, condition_mask))
45 if (player.IsPlacingLocal())
63 int count = action_data.m_MainItem.GetOnDigWormsAmount();
64 for (
int i = 0; i < count; i++)
76 MiscGameplayFunctions.DealEvinronmentAdjustedDmg(action_data.m_MainItem, action_data.m_Player, 4);
85 position = target.GetCursorHitPos();
89 if (
GetGame().IsSurfaceFertile(surface_type))
100 vector position = player.GetPosition();
102 heightDiff = position[1] - heightDiff;
104 return heightDiff <= 0.4;
class ActionTargets ActionTarget
const int ECE_PLACE_ON_SURFACE
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ActionContinuousBase()
override void OnFinishProgressServer(ActionData action_data)
bool IsPlayerOnGround(PlayerBase player)
override bool ActionConditionContinue(ActionData action_data)
void SetDiggignAnimation(ItemBase item)
DEPRECATED - See ItemBase.OverrideActionAnimation() to override commands for items.
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool Can(PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
bool IsTargetFertile(ActionTarget target)
override bool HasTarget()
override void CreateActionComponent()
proto native float SurfaceY(float x, float z)
proto float SurfaceGetType(float x, float z, out string type)
Returns: Y position the surface was found.
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
static const vector Forward
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
const float COLD_AREA_DIG_WORMS_MODIF
(deg Celsius) temperature limit up to which player is allowed to dig garden plots