DayZ 1.24
Loading...
Searching...
No Matches
ActionCraftStoneKnifeEnv.c
Go to the documentation of this file.
10
12{
14 {
15
17 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
18 m_FullBody = true;
19 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
21 m_Text = "#STR_CraftStoneKnife0";
22 }
23
29
30 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
31 {
32 //Action not allowed if player has broken legs
33 if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
34 return false;
35
36 Object targetObject = target.GetObject();
37 if (targetObject.IsRock())
38 return true;
39 return false;
40
41 }
42
44 {
47
48 knife = action_data.m_Player.SpawnEntityOnGroundPos("StoneKnife", action_data.m_Player.GetPosition());
49 action_data.m_MainItem.Delete();
50
51 MiscGameplayFunctions.TransferItemProperties(item_ingredient, knife);
52
53 }
54};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
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
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597