DayZ 1.24
Loading...
Searching...
No Matches
ActionRaiseMegaphone.c
Go to the documentation of this file.
2{
3 private const float REPEAT_AFTER_SEC = -1.0;
4
9}
10
12{
14 {
15 m_CallbackClass = ActionRaiseMegaphoneCB;
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_RAISEITEM;
17 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_RAISEITEM;
18 m_Text = "#raise_megaphone";
19 }
20
26
27 override bool HasProneException()
28 {
29 return true;
30 }
31
32 override bool HasProgress()
33 {
34 return false;
35 }
36
37 override bool HasTarget()
38 {
39 return false;
40 }
41
42 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
43 {
44 if (item.IsTransmitter())
45 {
47
48 if (megaphone && megaphone.GetCompEM().IsWorking())
49 return true;
50 }
51
52 return false;
53 }
54
56 {
58 megaphone.SetCanSpeak(true);
59 }
60
62 {
64 megaphone.SetCanSpeak(false);
65 }
66
68 {
70 megaphone.SetCanSpeak(true);
71 }
72
74 {
76 megaphone.SetCanSpeak(false);
77 }
78
79}
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
void OnEndServer(ActionData action_data)
Definition ActionBase.c:962
bool HasTarget()
Definition ActionBase.c:210
void OnStartClient(ActionData action_data)
Definition ActionBase.c:946
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
void OnStartServer(ActionData action_data)
Definition ActionBase.c:949
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
bool HasProgress()
For UI: hiding of progress bar.
Definition ActionBase.c:216
void OnEndClient(ActionData action_data)
Definition ActionBase.c:959
ActionRaiseMegaphoneCB ActionContinuousBaseCB ActionRaiseMegaphone()
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
override bool HasProneException()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597