Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioncraftimprovisedtorsocover.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 
13 {
15  {
16  m_CallbackClass = ActionCraftImprovisedTorsoCoverCB;
17  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
18  m_FullBody = true;
19  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
21  m_Text = "#STR_CraftImprovisedTorsoCover";
22  }
23 
24  override void CreateConditionComponents()
25  {
28  }
29 
30  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
31  {
32  if( item.GetQuantity() ==6 )
33  {
34  return true;
35  }
36  return false;
37  }
38 
39  override bool HasTarget()
40  {
41  return false;
42  }
43 
44  override void OnFinishProgressServer( ActionData action_data )
45  {
46  EntityAI item_ingredient = action_data.m_MainItem;
47  EntityAI cover;
48 
49  cover = action_data.m_Player.SpawnEntityOnGroundPos("TorsoCover_Improvised", action_data.m_Player.GetPosition());
50  action_data.m_MainItem.AddQuantity(-6);
51 
52  MiscGameplayFunctions.TransferItemProperties(item_ingredient, cover);
53  }
54 
55  override string GetSoundCategory(ActionData action_data)
56  {
57  return "ImprovisedCloth_craft";
58  }
59 };
ItemBase
Definition: inventoryitem.c:730
ActionCraftImprovisedTorsoCoverCB
Definition: actioncraftimprovisedtorsocover.c:1
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
ActionCraftImprovisedTorsoCover
Definition: actioncraftimprovisedtorsocover.c:12
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
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53
EntityAI
Definition: building.c:5