Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioncraftimprovisedheadcover.c
Go to the documentation of this file.
2 {
3  private const float TIME_TO_CRAFT_CLOTHES = 5.0;
4 
5  override void CreateActionComponent()
6  {
7  //float adjusted_time = m_ActionData.m_Player.GetSoftSkillsManager().AdjustCraftingTime(TIME_TO_CRAFT_CLOTHES,UASoftSkillsWeight.ROUGH_HIGH);
8  m_ActionData.m_ActionComponent = new CAContinuousTime(TIME_TO_CRAFT_CLOTHES);
9  }
10 };
11 
12 
14 {
16  {
17  m_CallbackClass = ActionCraftImprovisedHeadCoverCB;
18  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
19  m_FullBody = true;
20  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
22  m_Text = "#STR_CraftImprovisedHeadCover";
23  }
24 
25  override void CreateConditionComponents()
26  {
29  }
30 
31  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
32  {
33  if( item.GetQuantity() >= 2 )
34  {
35  return true;
36  }
37  return false;
38  }
39 
40  override bool HasTarget()
41  {
42  return false;
43  }
44 
45  override void OnFinishProgressServer( ActionData action_data )
46  {
47  EntityAI item_ingredient = action_data.m_MainItem;
48  EntityAI cover;
49 
50  cover = action_data.m_Player.SpawnEntityOnGroundPos("HeadCover_Improvised", action_data.m_Player.GetPosition());
51  action_data.m_MainItem.AddQuantity(-2);
52 
53  MiscGameplayFunctions.TransferItemProperties(item_ingredient, cover);
54  }
55 
56  override string GetSoundCategory(ActionData action_data)
57  {
58  return "ImprovisedCloth_craft";
59  }
60 };
ItemBase
Definition: inventoryitem.c:730
ActionCraftImprovisedHeadCover
Definition: actioncraftimprovisedheadcover.c:13
CAContinuousTime
Definition: cacontinuoustime.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
CCTNone
Definition: cctnone.c:1
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
TIME_TO_CRAFT_CLOTHES
const private float TIME_TO_CRAFT_CLOTHES
DEPRECATED.
Definition: actiondecraftropebelt.c:8
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
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
ActionCraftImprovisedHeadCoverCB
Definition: actioncraftimprovisedheadcover.c:1
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53
EntityAI
Definition: building.c:5