Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionviewcompass.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime( -1.0 );
6  //EnableStateChangeCallback();
7  }
8 
9  override void OnStateChange(int pOldState, int pCurrentState)
10  {
11  //Print("pOldState = " + pOldState);
12  //Print("pCurrentState = " + pCurrentState);
13 
14  if (pOldState != STATE_LOOP_LOOP)
15  return;
16 
17  if (m_ActionData.m_Action && ActionViewOptics.Cast(m_ActionData.m_Action))
18  {
19  //ActionViewOptics.Cast(m_ActionData.m_Action).ExitOptics( ItemOptics.Cast(m_ActionData.m_MainItem), m_ActionData.m_Player );
20  }
21  }
22 };
23 
25 {
26  void ActionViewCompass()
27  {
28  m_CallbackClass = ActionRaiseAndViewCB;
29  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENITEM_ONCE;
30  m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_OPENITEM_ONCE;
31  m_Text = "#use_compas";
32  }
33 
34  override void CreateConditionComponents()
35  {
38  }
39 
40  override bool HasProgress()
41  {
42  return false;
43  }
44 
45  override bool HasTarget()
46  {
47  return false;
48  }
49 
50  override bool HasProneException()
51  {
52  return true;
53  }
54 
55  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
56  {
57  return item.IsOpen();
58  }
59 
60  /*override void OnCompleteServer( ActionData action_data )
61  {
62  if (action_data.m_Player)
63  {
64  string message = Rangefinder.Cast( action_data.m_MainItem ).DoMeasurement(action_data.m_Player);
65  SendMessageToClient(action_data.m_Player,message);
66  }
67 
68  action_data.m_Player.GetSoftSkillManager().AddSpecialty( m_SpecialtyWeight );
69  }*/
70 }
ItemBase
Definition: inventoryitem.c:730
ActionViewCompass
Definition: actionviewcompass.c:24
ActionRaiseAndViewCB
Definition: actionviewcompass.c:1
CAContinuousTime
Definition: cacontinuoustime.c:1
CCTNone
Definition: cctnone.c:1
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionViewOptics
Definition: actionviewoptics.c:1
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