DayZ 1.24
Loading...
Searching...
No Matches
ActionUseRangefinder.c
Go to the documentation of this file.
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_GESTUREFB_LOOKOPTICS;
16 m_Text = "#use_range_finder";
17 }
18
24
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
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}
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
override void CreateConditionComponents()
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool IsFullBody(PlayerBase player)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597