Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiontunefrequency.c
Go to the documentation of this file.
2 {
3  private const float REPEAT_AFTER_SEC = 1.0;
4 
5  override void CreateActionComponent()
6  {
7  m_ActionData.m_ActionComponent = new CAContinuousRepeat(REPEAT_AFTER_SEC);
8  }
9 }
10 
12 {
14  {
15  m_CallbackClass = ActionTuneFrequencyCB;
16  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ITEM_TUNE;
17  m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_ITEM_TUNE;
19 
20  m_Text = "#tune_frequency";
21  }
22 
23  override void CreateConditionComponents()
24  {
27  }
28 
29  override bool HasProneException()
30  {
31  return true;
32  }
33 
34  override bool HasTarget()
35  {
36  return false;
37  }
38 
39  override bool ActionCondition ( PlayerBase player, ActionTarget target, ItemBase item )
40  {
41  if ( item.IsTransmitter() )
42  {
43  TransmitterBase transmitter = TransmitterBase.Cast( item );
44 
45  if ( transmitter.GetCompEM().IsWorking() )
46  {
47  //transmitter.DisplayRadioInfo( transmitter.GetTunedFrequency().ToString(), player );
48 
49  return true;
50  }
51  }
52 
53  return false;
54  }
55 
56  override void OnFinishProgressServer( ActionData action_data )
57  {
58  TransmitterBase transmitter = TransmitterBase.Cast( action_data.m_MainItem );
59  transmitter.SetNextFrequency( action_data.m_Player );
60  }
61 }
ItemBase
Definition: inventoryitem.c:730
CAContinuousRepeat
Definition: cacontinuousrepeat.c:1
HasProneException
override bool HasProneException()
Definition: actiontunefrequency.c:29
UASoftSkillsWeight
Definition: actionconstants.c:118
CreateConditionComponents
override void CreateConditionComponents()
Definition: actiontunefrequency.c:23
CCTNone
Definition: cctnone.c:1
REPEAT_AFTER_SEC
const private float REPEAT_AFTER_SEC
Definition: actiondialcombinationlock.c:2
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actiontunefrequency.c:56
PlayerBase
Definition: playerbaseclient.c:1
TransmitterBase
Definition: baseradio.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
ActionTuneFrequency
ActionTuneFrequencyCB ActionContinuousBaseCB ActionTuneFrequency()
Definition: actiontunefrequency.c:13
HasTarget
override bool HasTarget()
Definition: actiontunefrequency.c:34
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
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actiontunefrequency.c:39
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
ActionTuneFrequencyCB
Definition: actiontunefrequency.c:1
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68