Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioncraftboneknife.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  //float adjusted_time = m_ActionData.m_Player.GetSoftSkillsManager().AdjustCraftingTime(TIME_TO_CRAFT_KNIFE,UASoftSkillsWeight.ROUGH_HIGH);
6  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.DEFAULT_CRAFT);
7  }
8 };
9 
11 {
13  {
14  m_CallbackClass = ActionCraftBoneKnifeCB;
15  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
16  m_FullBody = true;
17  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
19  m_Text = "#STR_CraftBoneKnife0";
20  }
21 
22  override void CreateConditionComponents()
23  {
26  }
27 
28  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
29  {
30  if( item.GetQuantity() >= 2 )
31  {
32  return true;
33  }
34  return false;
35  }
36 
37  override bool HasTarget()
38  {
39  return false;
40  }
41 
42  override void OnFinishProgressServer( ActionData action_data )
43  {
44  EntityAI knife = action_data.m_Player.SpawnEntityOnGroundPos("BoneKnife", action_data.m_Player.GetPosition());
45  action_data.m_MainItem.AddQuantity(-2);
46 
47  MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem, knife);
48  }
49 
50  override string GetSoundCategory(ActionData action_data)
51  {
52  return "BoneKnife_craft";
53  }
54 };
ItemBase
Definition: inventoryitem.c:730
CAContinuousTime
Definition: cacontinuoustime.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
CCTNone
Definition: cctnone.c:1
ActionCraftBoneKnife
Definition: actioncraftboneknife.c:10
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
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionCraftBoneKnifeCB
Definition: actioncraftboneknife.c:1
ActionContinuousBase
Definition: actioncontinuousbase.c:132
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
EntityAI
Definition: building.c:5