3 override void CreateActionComponent()
29 if (!super.Can(player, target, item, condition_mask))
32 return player.CheckFreeSpace(
vector.Forward, 1.0,
false);
39 if (
Class.CastTo(target_IB, target.GetObject()))
41 if (target_IB.CanBeDigged())
43 return target_IB.IsInherited(UndergroundStash);
52 super.OnExecuteClient(action_data);
59 super.OnExecuteServer(action_data);
77 ErrorEx(
"Cannot get entity=" + targetEntity);
82 if (!targetEntity.GetInventory().GetCurrentInventoryLocation(target_IL))
84 ErrorEx(
"Cannot get inventory location of entity=" + targetEntity);
89 UndergroundStash stash;
90 if (
Class.CastTo(stash, targetEntity))
92 ItemBase stashedItem = stash.GetStashedItem();
96 action_data.m_Player.ServerReplaceItemWithNew(lambda);
99 g_Game.ObjectDelete(stash);
103 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 10);
109 return string.Format(
"Player %1 Dug out %2 at position %3", action_data.m_Player, action_data.m_Target.GetObject(), action_data.m_Target.GetObject().GetPosition());
117 override void CopyOldPropertiesToNew(notnull
EntityAI old_item,
EntityAI new_item)
119 super.CopyOldPropertiesToNew(old_item, new_item);