29 override void CreateConditionComponents()
35 override bool Can(
PlayerBase player, ActionTarget target,
ItemBase item,
int condition_mask)
37 if (!super.Can(player, target, item, condition_mask))
40 return player.CheckFreeSpace(
vector.Forward, 0.8,
false);
45 if (player.IsPlacingLocal())
48 return IsTargetFertile(target) && IsPlayerOnGround(player);
51 override bool ActionConditionContinue(ActionData action_data)
53 return IsPlayerOnGround(action_data.m_Player);
56 override bool HasTarget()
61 override void OnFinishProgressServer(ActionData action_data)
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);
79 bool IsTargetFertile(ActionTarget target)
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;
108 void SetDiggignAnimation(
ItemBase item);