DayZ 1.24
Loading...
Searching...
No Matches
ActionRaiseMegaphone.c File Reference

Go to the source code of this file.

Classes

class  ActionRaiseMegaphoneCB
 

Functions

ActionRaiseMegaphoneCB ActionContinuousBaseCB ActionRaiseMegaphone ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool HasProneException ()
 
override bool HasProgress ()
 
override bool HasTarget ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 
override void OnStartClient (ActionData action_data)
 
override void OnEndClient (ActionData action_data)
 

Variables

const float REPEAT_AFTER_SEC = -1.0
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 42 of file ActionRaiseMegaphone.c.

43 {
44 if (item.IsTransmitter())
45 {
47
48 if (megaphone && megaphone.GetCompEM().IsWorking())
49 return true;
50 }
51
52 return false;
53 }

◆ ActionRaiseMegaphone()

Definition at line 1 of file ActionRaiseMegaphone.c.

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 }
string m_Text
Definition ActionBase.c:49
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and ItemMegaphone::SetActions().

◆ CreateActionComponent()

override void ActionRaiseMegaphone::CreateActionComponent ( )
private

Definition at line 16 of file ActionRaiseMegaphone.c.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 21 of file ActionRaiseMegaphone.c.

22 {
25 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasProgress()

override bool HasProgress ( )

Definition at line 32 of file ActionRaiseMegaphone.c.

33 {
34 return false;
35 }

◆ HasProneException()

override bool HasProneException ( )

Definition at line 27 of file ActionRaiseMegaphone.c.

28 {
29 return true;
30 }

◆ HasTarget()

override bool HasTarget ( )

Definition at line 37 of file ActionRaiseMegaphone.c.

38 {
39 return false;
40 }

◆ OnEndClient()

override void OnEndClient ( ActionData action_data)

Definition at line 73 of file ActionRaiseMegaphone.c.

74 {
76 megaphone.SetCanSpeak(false);
77 }

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)

Definition at line 61 of file ActionRaiseMegaphone.c.

62 {
64 megaphone.SetCanSpeak(false);
65 }

◆ OnStartClient()

override void OnStartClient ( ActionData action_data)

Definition at line 67 of file ActionRaiseMegaphone.c.

68 {
70 megaphone.SetCanSpeak(true);
71 }

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)

Definition at line 55 of file ActionRaiseMegaphone.c.

56 {
58 megaphone.SetCanSpeak(true);
59 }

Variable Documentation

◆ REPEAT_AFTER_SEC

const float REPEAT_AFTER_SEC = -1.0
private

Definition at line 14 of file ActionRaiseMegaphone.c.