DayZ 1.24
Loading...
Searching...
No Matches
ActionMineRock.c
Go to the documentation of this file.
10
12{
14 {
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_MINEROCK;
17 m_FullBody = true;
18 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
20 //m_Text = "#mine";
21 }
22
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 return true;
38 return false;
39 }
40
42 {
43 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
44 }
45
47 {
48 ItemBase item = action_data.m_MainItem;
49 if (item.IsKindOf("Hammer"))
50 return "MinningLight";
51 else if (item.IsKindOf("MeatTenderizer"))
52 return "MinningHard";
53
54 return "";
55 }
56
57};
58
bool m_FullBody
Definition ActionBase.c:52
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
eBrokenLegs
Definition EBrokenLegs.c:2
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
const float TIME_BETWEEN_MATERIAL_DROPS
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override string GetSoundCategory(ActionData action_data)
override void CreateConditionComponents()
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597