Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionminerock.c
Go to the documentation of this file.
2 {
3  private const float TIME_BETWEEN_MATERIAL_DROPS = 8;
4 
5  override void CreateActionComponent()
6  {
7  m_ActionData.m_ActionComponent = new CAContinuousMineRock(TIME_BETWEEN_MATERIAL_DROPS);
8  }
9 };
10 
12 {
13  void ActionMineRock()
14  {
15  m_CallbackClass = ActionMineRockCB;
16  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_MINEROCK;
17  m_FullBody = true;
18  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
20  //m_Text = "#mine";
21  }
22 
23  override void CreateConditionComponents()
24  {
27  }
28 
29  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
30  {
31  //Action not allowed if player has broken legs
32  if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
33  return false;
34 
35  Object targetObject = target.GetObject();
36  if ( targetObject.IsRock() )
37  {
38  return true;
39  }
40  return false;
41  }
42 
43  override void OnFinishProgressServer( ActionData action_data )
44  {
45  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
46  }
47 
48  override string GetSoundCategory(ActionData action_data)
49  {
50  ItemBase item = action_data.m_MainItem;
51  if (item.IsKindOf("Hammer"))
52  {
53  return "MinningLight";
54  }
55  else if (item.IsKindOf("MeatTenderizer"))
56  {
57  return "MinningHard";
58  }
59 
60  return "";
61  }
62 
63 };
64 
66 {
67  void ActionMineRock1H()
68  {
69  m_CallbackClass = ActionMineRockCB;
70  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_ASSEMBLE;
71  m_FullBody = true;
72  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
74  }
75 }
ItemBase
Definition: inventoryitem.c:730
ActionMineRockCB
Definition: actionminerock.c:1
CAContinuousMineRock
Definition: cacontinuousminerock.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionMineBase
Definition: actionminetree.c:16
ActionMineRock
Definition: actionminerock.c:11
UAMaxDistances
Definition: actionconstants.c:104
eBrokenLegs
eBrokenLegs
Definition: ebrokenlegs.c:1
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
Object
Definition: objecttyped.c:1
ActionMineRock1H
Definition: actionminerock.c:65
CCTCursor
Definition: cctcursor.c:1
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53