DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
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
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};
protected float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
class ActionTargets ActionTarget
protected ActionData m_ActionData
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
ItemBase m_MainItem
Definition ActionBase.c:28
PlayerBase m_Player
Definition ActionBase.c:33
ref CABase m_ActionComponent
Definition ActionBase.c:30
const float DEFAULT_CRAFT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602