DayZ 1.24
Loading...
Searching...
No Matches
AdvancedCommunication.c
Go to the documentation of this file.
2{
6
8 {
9 if (!GetGame().IsDedicatedServer())
10 {
11 if (GetGame().GetPlayer())
12 m_ActionsInitialize = false;
13 }
14 }
15
16 //HUD
17 /*
18 protected Hud GetHud( PlayerBase player )
19 {
20 if ( !player )
21 {
22 return NULL;
23 }
24
25 return player.m_Hud;
26 }
27
28 void DisplayRadioInfo( string message, PlayerBase player )
29 {
30 Hud hud;
31 if ( player )
32 {
33 hud = GetHud( player );
34 }
35
36 if ( hud )
37 {
38 hud.SetWalkieTalkieText( message );
39 hud.ShowWalkieTalkie( 3 );
40 }
41 }
42 */
43
44 //control transmitter via user actions
46 {
47 GetCompEM().SwitchOn();
48 }
49
51 {
52 GetCompEM().SwitchOff();
53 }
54
56 {
58 if (!m_InputActionMap)
59 {
62 SetActions();
63 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
64 }
65 }
66
77
84
85 void AddAction(typename actionName)
86 {
87 ActionBase action = ActionManagerBase.GetAction(actionName);
88
89 if (!action)
90 {
91 Debug.LogError("Action " + actionName + " dosn't exist!");
92 return;
93 }
94
95 typename ai = action.GetInputType();
96 if (!ai)
97 {
98 m_ActionsInitialize = false;
99 return;
100 }
101
103
104 if (!action_array)
105 {
108 }
109
111 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString(), "n/a", "Add action");
112 action_array.Insert(action);
113 }
114
116 {
118 ActionBase action = player.GetActionManager().GetAction(actionName);
119 typename ai = action.GetInputType();
121
122 if (action_array)
123 action_array.RemoveItem(action);
124 }
125}
126
128{
129 override bool IsInventoryVisible()
131 return false;
133};
142{
154};
map< typename, ref array< ActionBase_Basic > > TInputActionMap
void AddAction(typename actionName)
TInputActionMap m_InputActionMap
bool m_ActionsInitialize
class PASBroadcaster extends AdvancedCommunication IsInventoryVisible
static ref map< typename, ref TInputActionMap > m_AdvComTypeActionsMap
void SetActions()
void InitializeActions()
string Type
PlayerBase GetPlayer()
proto native void SwitchOn(bool onOff)
proto native void SetFrequencyByIndex(int index)
proto native void SetPrevChannel()
proto native bool IsReceiving()
proto native void EnableReceive(bool state)
proto native bool IsBroadcasting()
proto native float GetTunedFrequency()
proto native bool IsOn()
proto native void EnableBroadcast(bool state)
proto native int GetTunedFrequencyIndex()
proto native void SetNextChannel()
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:341
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:143
void RemoveAction(typename actionName)
void AddAction(typename actionName)
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
TInputActionMap m_InputActionMap
void TurnOffTransmitter()
void AdvancedCommunication()
static bool IsActionLogEnable()
Definition Debug.c:719
proto native CGame GetGame()