DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionRaiseMegaphone.c

См. исходные тексты.

Структуры данных

class  ActionRaiseMegaphoneCB
 

Функции

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)
 

Переменные

const float REPEAT_AFTER_SEC = -1.0
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
43 {
44 if ( item.IsTransmitter() )
45 {
47
48 if ( megaphone && megaphone.GetCompEM().IsWorking() )
49 {
50 return true;
51 }
52 }
53
54 return false;
55 }
Definition Megaphone.c:2
Definition EntityAI.c:95

◆ ActionRaiseMegaphone()

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 }
int m_CommandUIDProne
Definition ActionBase.c:32
int m_CommandUID
Definition ActionBase.c:31
Definition ActionRaiseMegaphone.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions() и ItemMegaphone::SetActions().

◆ CreateActionComponent()

override void CreateActionComponent ( )
private

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
22 {
23 m_ConditionTarget = new CCTNone;
24 m_ConditionItem = new CCINonRuined;
25 }
Definition CCINonRuined.c:2
Definition CCTNone.c:2

◆ HasProgress()

override bool HasProgress ( )
33 {
34 return false;
35 }

◆ HasProneException()

override bool HasProneException ( )
28 {
29 return true;
30 }

◆ HasTarget()

override bool HasTarget ( )
38 {
39 return false;
40 }

◆ OnEndClient()

override void OnEndClient ( ActionData action_data)
80 {
82 megaphone.SetCanSpeak( false );
83 }

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
66 {
67 super.OnEndServer(action_data);
68
70 megaphone.SetCanSpeak( false );
71 }

◆ OnStartClient()

override void OnStartClient ( ActionData action_data)
74 {
76 megaphone.SetCanSpeak( true );
77 }

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)
58 {
59 super.OnStartServer(action_data);
60
62 megaphone.SetCanSpeak( true );
63 }

Переменные

◆ REPEAT_AFTER_SEC

const float REPEAT_AFTER_SEC = -1.0
private