3 override void CreateActionComponent()
7 if (m_ActionData.m_MainItem.KindOf(
"Knife"))
8 time_spent = time_spent * 1.2;
26 override void CreateConditionComponents()
34 if (!super.Can(player, target, item, condition_mask))
37 return player.CheckFreeSpace(
vector.Forward, 0.8,
false);
42 if (player.IsPlacingLocal())
45 return IsTargetFertile(target) && IsPlayerOnGround(player);
48 override bool ActionConditionContinue(
ActionData action_data)
50 return IsPlayerOnGround(action_data.m_Player);
55 if (super.SetupAction(player, target, item, action_data, extra_data))
59 SetDiggingAnimation(item);
68 override bool HasTarget()
73 override void OnFinishProgressServer(
ActionData action_data)
77 worms.SetQuantity(10,
false);
78 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 4);
82 void SetDiggingAnimation(
ItemBase item )
84 if (item.KindOf(
"Knife"))
102 position = target.GetCursorHitPos();
104 GetGame().SurfaceGetType(position[0], position[2], surface_type);
106 if (
GetGame().IsSurfaceFertile(surface_type))
117 vector position = player.GetPosition();
118 float heightDiff =
GetGame().SurfaceY(position[0], position[2]);
119 heightDiff = position[1] - heightDiff;
121 return heightDiff <= 0.4;