Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiondecraftropebelt.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.DEFAULT_DECRAFT);
6  }
7 
9  private const float TIME_TO_CRAFT_CLOTHES = 5.0;
10 }
11 
13 {
15  {
16  m_CallbackClass = ActionDeCraftRopeBeltCB;
17  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
18  m_FullBody = true;
19  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
21 
22  m_Text = "#STR_DeCraftRopeBelt";
23  }
24 
25  override void CreateConditionComponents()
26  {
28  m_ConditionTarget = new CCTNone();
29  }
30 
31  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
32  {
33  return item.GetInventory().AttachmentCount() == 0;
34  }
35 
36  override bool HasTarget()
37  {
38  return false;
39  }
40 
41  override void OnFinishProgressServer(ActionData action_data)
42  {
43  EntityAI ropebelt = action_data.m_MainItem;
44 
45  EntityAI rope = action_data.m_Player.SpawnEntityOnGroundPos("Rope", action_data.m_Player.GetPosition());
46  action_data.m_MainItem.Delete();
47 
48  MiscGameplayFunctions.TransferItemProperties(ropebelt, rope);
49  }
50 }
ItemBase
Definition: inventoryitem.c:730
HasTarget
override bool HasTarget()
Definition: actiondecraftropebelt.c:36
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actiondecraftropebelt.c:31
CAContinuousTime
Definition: cacontinuoustime.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
CCTNone
Definition: cctnone.c:1
ActionDeCraftRopeBelt
ActionDeCraftRopeBeltCB ActionContinuousBaseCB ActionDeCraftRopeBelt()
Definition: actiondecraftropebelt.c:14
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
ActionDeCraftRopeBeltCB
Definition: actiondecraftropebelt.c:1
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
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actiondecraftropebelt.c:41
ActionContinuousBase
Definition: actioncontinuousbase.c:132
CCINonRuined
Definition: ccinonruined.c:1
CreateConditionComponents
override void CreateConditionComponents()
Definition: actiondecraftropebelt.c:25
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