Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiontuneradiostation.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 = ActionTuneRadioStationCB;
16  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ITEM_TUNE;
17  m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_ITEM_TUNE;
19 
20  m_Text = "#tune_radio_station";
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  Radio radio = Radio.Cast( item );
42 
43  if ( radio.CanOperate() )
44  {
45  return true;
46  }
47 
48  return false;
49  }
50 
51  override void OnFinishProgressServer( ActionData action_data )
52  {
53  Radio radio = Radio.Cast( action_data.m_MainItem );
54  radio.TuneNextStation();
55  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
56  }
57 }
ItemBase
Definition: inventoryitem.c:730
CAContinuousRepeat
Definition: cacontinuousrepeat.c:1
ActionTuneRadioStationCB
Definition: actiontuneradiostation.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
CCTNone
Definition: cctnone.c:1
REPEAT_AFTER_SEC
const private float REPEAT_AFTER_SEC
Definition: actiondialcombinationlock.c:2
HasTarget
override bool HasTarget()
Definition: actiontuneradiostation.c:34
PlayerBase
Definition: playerbaseclient.c:1
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actiontuneradiostation.c:39
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actiontuneradiostation.c:51
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
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
CreateConditionComponents
override void CreateConditionComponents()
Definition: actiontuneradiostation.c:23
ActionContinuousBase
Definition: actioncontinuousbase.c:132
CCINonRuined
Definition: ccinonruined.c:1
HasProneException
override bool HasProneException()
Definition: actiontuneradiostation.c:29
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
ActionTuneRadioStation
ActionTuneRadioStationCB ActionContinuousBaseCB ActionTuneRadioStation()
Definition: actiontuneradiostation.c:13