DayZ 1.24
Loading...
Searching...
No Matches
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);
7 }
8};
9
11{
13 {
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
27
28 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
29 {
30 if (item.GetQuantity() >= 2)
31 return true;
32 return false;
33 }
34
35 override bool HasTarget()
36 {
37 return false;
38 }
39
41 {
42 EntityAI knife = action_data.m_Player.SpawnEntityOnGroundPos("BoneKnife", action_data.m_Player.GetPosition());
43 action_data.m_MainItem.AddQuantity(-2);
44
45 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem, knife);
46 }
47
49 {
50 return "BoneKnife_craft";
51 }
52};
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
ActionData m_ActionData
override void CreateActionComponent()
override string GetSoundCategory(ActionData action_data)
override void CreateConditionComponents()
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_CRAFT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597