Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioncraft.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousCraft(0); //default value can be set in recipes
6  }
7 };
8 
10 {
11  bool m_HasStarted;
12 
13  ItemBase m_Item1;
14  ItemBase m_Item2;
15 
16  int m_RecipeID;
17 
18  void ActionCraft()
19  {
20  m_Sound = "craft_universal_0";
21 
22  m_CallbackClass = ActionCraftCB;
23  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
24  m_FullBody = true;
25  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
26 
27  m_Text = "#craft";
28  }
29 
30  override void CreateConditionComponents()
31  {
34  }
35 
36  //override void OnStart( ActionData action_data )
37  //{
38  /*
39  if( action_data.m_Player.GetCraftingMeta() )
40  {
41  m_Item1 = action_data.m_Player.GetCraftingMeta().GetIngredient1();
42  m_Item2 = action_data.m_Player.GetCraftingMeta().GetIngredient2();
43  m_RecipeID = action_data.m_Player.GetCraftingMeta().GetRecipeID();
44  if(m_Item1 == NULL || m_Item2 == NULL || m_RecipeID < 0) return;
45  }
46  */
47  //m_HasStarted = true;
48  //}
49 
50  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
51  {
52  /*if( !m_HasStarted )
53  {
54  if ( player.IsCraftingSetUp() )
55  {
56  return true;
57  }
58  return false;
59  }
60  else
61  {
62  return true;
63  }*/
64  }
65 
66 
67 
68  override void ApplyModifiers( ActionData action_data )
69  {
70  }
71 
72 
73 
74  void CancelCraft(PlayerBase player)
75  {
76  //action_data.m_Player.SetCraftingReady(false);
77  //action_data.m_Player.DisableCrafting();
78  }
79 };
ItemBase
Definition: inventoryitem.c:730
m_Sound
EffectSound m_Sound
Definition: hungersoundhandler.c:18
ActionCraft
Definition: actioncraft.c:9
CCTNone
Definition: cctnone.c:1
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
CAContinuousCraft
Definition: cacontinuouscraft.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
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
ActionCraftCB
Definition: actioncraft.c:1
ActionContinuousBase
Definition: actioncontinuousbase.c:132
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53