Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiontunefrequencyonground.c
Go to the documentation of this file.
2 {
3  string m_RadioFreq;
4 
6  {
7  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENDOORFW;
8  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
9  m_RadioFreq = string.Empty;
10  m_Text = "#tune_frequency";
11  }
12 
13  override void OnActionInfoUpdate( PlayerBase player, ActionTarget target, ItemBase item )
14  {
15  Object target_object = target.GetObject();
16  Land_Radio_PanelBig transmitter = Land_Radio_PanelBig.Cast( target.GetObject() );
17  m_Text = "#tune_frequency | " + transmitter.GetTunedFrequency().ToString() + " MHz";
18  }
19 
20  override typename GetInputType()
21  {
23  }
24 
25  override bool HasProgress()
26  {
27  return false;
28  }
29 
30  override bool ActionCondition ( PlayerBase player, ActionTarget target, ItemBase item )
31  {
32  Object target_object = target.GetObject();
33  Land_Radio_PanelBig transmitter = Land_Radio_PanelBig.Cast( target_object );
34  string selection = target_object.GetActionComponentName( target.GetComponentIndex() );
35 
36  if ( transmitter.GetCompEM().IsWorking() && selection == "control_panel" )
37  {
38  //transmitter.DisplayRadioInfo( transmitter.GetTunedFrequency().ToString(), player );
39  //m_RadioFreq = transmitter.GetTunedFrequency().ToString();
40 
41  return true;
42  }
43 
44  return false;
45  }
46 
47  override void OnExecuteServer( ActionData action_data )
48  {
49  Land_Radio_PanelBig transmitter = Land_Radio_PanelBig.Cast( action_data.m_Target.GetObject() );
50  transmitter.SetNextFrequency( action_data.m_Player );
51  }
52 }
ItemBase
Definition: inventoryitem.c:730
ContinuousInteractActionInput
Definition: actioninput.c:521
ActionInteractBase
Definition: actioninteractbase.c:54
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionTuneFrequencyOnGround
Definition: actiontunefrequencyonground.c:1
Object
Definition: objecttyped.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53