Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioninteractbase.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAInteract;
6  }
7 
8  override void OnAnimationEvent(int pEventID)
9  {
10 #ifdef DIAG_DEVELOPER
11  if ( LogManager.IsActionLogEnable() )
12  {
13  if (m_ActionData)
14  Debug.ActionLog("n/a", m_ActionData.m_Action.ToString() , "n/a", "OnAnimationEvent", m_ActionData.m_Player.ToString() );
15  }
16 #endif
17  if ( !m_Interrupted && pEventID == UA_ANIM_EVENT && m_ActionData && m_ActionData.m_Action )
18  {
19  AnimatedActionBase action = AnimatedActionBase.Cast(m_ActionData.m_Action);
20  action.OnAnimationEvent(m_ActionData);
21  }
22  }
23 
24  override void InitActionComponent()
25  {
26 #ifdef DIAG_DEVELOPER
27  if ( LogManager.IsActionLogEnable() )
28  {
29  Debug.ActionLog("n/a", m_ActionData.m_Action.ToString() , "n/a", "InitActionComponent", m_ActionData.m_Player.ToString() );
30  }
31 #endif
32  m_Interrupted = false;
33  m_Canceled = false;
34 
35  CreateActionComponent();
36  if ( m_ActionData.m_ActionComponent )
37  {
38  m_ActionData.m_ActionComponent.Init(m_ActionData);
39  }
40  m_ActionData.m_State = UA_PROCESSING;
42  m_SoundObject = m_ActionData.m_Action.PlayActionSound(m_ActionData.m_Player);
43  }
44 
45  override void EndActionComponent()
46  {
47  SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
48  m_ActionData.m_State = UA_FINISHED;
49  }
50 };
51 
52 
53 
55 {
56  //deprecated
57  string m_HUDCursorIcon;
58 
59  void ActionInteractBase()
60  {
61  m_CallbackClass = ActionInteractBaseCB;
62  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
63  }
64 
65  override void CreateConditionComponents()
66  {
69  }
70 
71  //deprecated
72  string GetHUDCursorIcon()
73  {
74  return "";
75  }
76 
77  override typename GetInputType()
78  {
79  return InteractActionInput;
80  }
81 
82  override int GetActionCategory()
83  {
84  return AC_INTERACT;
85  }
86 
87  override bool UseMainItem()
88  {
89  return false;
90  }
91 
92  override bool MainItemAlwaysInHands()
93  {
94  return false;
95  }
96 };
LogManager
Definition: debug.c:734
UA_ANIM_EVENT
const int UA_ANIM_EVENT
Definition: constants.c:443
CCINone
Definition: ccinone.c:1
AC_INTERACT
const int AC_INTERACT
Definition: _constants.c:4
CCTObject
Definition: cctobject.c:1
ActionInteractBaseCB
Definition: actioninteractbase.c:1
UAMaxDistances
Definition: actionconstants.c:104
AnimatedActionBase
Definition: animatedactionbase.c:133
CAInteract
Definition: cainteract.c:1
ActionInteractBase
Definition: actioninteractbase.c:54
m_Canceled
bool m_Canceled
Definition: smptanimmeta.c:16
UA_FINISHED
const int UA_FINISHED
Definition: constants.c:436
InteractActionInput
Definition: actioninput.c:534
RegisterAnimationEvent
class DayZCreatureAnimInterface RegisterAnimationEvent(string event_name, string function_name)
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
m_Interrupted
bool m_Interrupted
Definition: actionmanagerbase.c:49
Debug
Definition: debug.c:13
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
UA_PROCESSING
const int UA_PROCESSING
Definition: constants.c:434
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
ActionBaseCB
Definition: animatedactionbase.c:1