Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionuserangefinder.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime( 1.0 );
6  }
7 };
8 
10 {
12  {
13  m_CallbackClass = ActionUseRangefinderCB;
14  m_CommandUID = DayZPlayerConstants.CMD_GESTUREFB_LOOKOPTICS;
16  m_Text = "#use_range_finder";
17  }
18 
19  override void CreateConditionComponents()
20  {
23  }
24 
25  override bool IsFullBody(PlayerBase player)
26  {
27  return true;
28  }
29 
30  override bool HasTarget()
31  {
32  return false;
33  }
34 
35  override bool ActionCondition ( PlayerBase player, ActionTarget target, ItemBase item )
36  {
37  return item.GetCompEM().CanWork() && Rangefinder.Cast( item ).IsInOptics();
38  }
39 
40  override void OnFinishProgressServer( ActionData action_data )
41  {
42  /*if (action_data.m_Player)
43  {
44  string message = Rangefinder.Cast( action_data.m_MainItem ).DoMeasurement(action_data.m_Player);
45  SendMessageToClient(action_data.m_Player,message);
46  }*/
47 
48  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
49  }
50 }
ItemBase
Definition: inventoryitem.c:730
ActionUseRangefinder
Definition: actionuserangefinder.c:9
CAContinuousTime
Definition: cacontinuoustime.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
CCTNone
Definition: cctnone.c:1
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
ActionUseRangefinderCB
Definition: actionuserangefinder.c:1
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
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