DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
AdvancedCommunication.c
См. документацию.
2{
6
8 {
9 if (!GetGame().IsDedicatedServer())
10 {
11 if(GetGame().GetPlayer())
12 {
13 m_ActionsInitialize = false;
14 }
15 }
16 }
17
18 //HUD
19 /*
20 protected Hud GetHud( PlayerBase player )
21 {
22 if ( !player )
23 {
24 return NULL;
25 }
26
27 return player.m_Hud;
28 }
29
30 void DisplayRadioInfo( string message, PlayerBase player )
31 {
32 Hud hud;
33 if ( player )
34 {
35 hud = GetHud( player );
36 }
37
38 if ( hud )
39 {
40 hud.SetWalkieTalkieText( message );
41 hud.ShowWalkieTalkie( 3 );
42 }
43 }
44 */
45
46 //control transmitter via user actions
48 {
49 GetCompEM().SwitchOn();
50 }
51
53 {
54 GetCompEM().SwitchOff();
55 }
56
58 {
60 if(!m_InputActionMap)
61 {
63 m_InputActionMap = iam;
64 SetActions();
65 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
66 }
67 }
68
69 override void GetActions(typename action_input_type, out array<ActionBase_Basic> actions)
70 {
72 {
75 }
76
77 actions = m_InputActionMap.Get(action_input_type);
78 }
79
86
87 void AddAction(typename actionName)
88 {
89 ActionBase action = ActionManagerBase.GetAction(actionName);
90
91 if (!action)
92 {
93 Debug.LogError("Action " + actionName + " dosn't exist!");
94 return;
95 }
96
97 typename ai = action.GetInputType();
98 if (!ai)
99 {
100 m_ActionsInitialize = false;
101 return;
102 }
103
104 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
105
106 if (!action_array)
107 {
108 action_array = new array<ActionBase_Basic>;
109 m_InputActionMap.Insert(ai, action_array);
110 }
111
113 {
114 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action" );
115 }
116 action_array.Insert(action);
117 }
118
119 void RemoveAction(typename actionName)
120 {
121 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
122 ActionBase action = player.GetActionManager().GetAction(actionName);
123 typename ai = action.GetInputType();
124 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
125
126 if (action_array)
127 {
128 action_array.RemoveItem(action);
129 }
130 }
131}
132
134{
135 override bool IsInventoryVisible()
137 return false;
139};
142{
143 proto native void SwitchOn(bool onOff);
144 proto native bool IsOn();
145};
146
147class StaticTransmitter extends AdvancedCommunication
148{
149 proto native void SwitchOn(bool onOff);
150 proto native bool IsOn();
151 proto native void SetNextChannel();
152 proto native void SetPrevChannel();
153 proto native float GetTunedFrequency();
154 proto native void EnableBroadcast(bool state);
155 proto native void EnableReceive(bool state);
156 proto native bool IsBroadcasting();
157 proto native bool IsReceiving();
158 proto native int GetTunedFrequencyIndex();
159 proto native void SetFrequencyByIndex(int index);
160};
void ActionManagerBase(PlayerBase player)
Определения ActionManagerBase.c:63
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Определения ActionManagerClient.c:1
void AddAction(typename actionName)
Определения AdvancedCommunication.c:220
class PASBroadcaster extends AdvancedCommunication IsInventoryVisible
Определения AdvancedCommunication.c:135
void SetActions()
Определения AdvancedCommunication.c:213
void InitializeActions()
Определения AdvancedCommunication.c:190
map
Определения ControlsXboxNew.c:4
string Type
Определения JsonDataContaminatedArea.c:11
PlayerBase GetPlayer()
Определения ModifierBase.c:51
GetInputType()
Определения ActionBase.c:215
Определения ActionBase.c:53
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()
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.
Определения Debug.c:245
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Определения Debug.c:127
Определения Debug.c:2
void TurnOnTransmitter()
Определения AdvancedCommunication.c:47
void InitializeActions()
Определения AdvancedCommunication.c:57
void RemoveAction(typename actionName)
Определения AdvancedCommunication.c:119
static ref map< typename, ref TInputActionMap > m_AdvComTypeActionsMap
Определения AdvancedCommunication.c:3
void AddAction(typename actionName)
Определения AdvancedCommunication.c:87
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Определения AdvancedCommunication.c:69
void SetActions()
Определения AdvancedCommunication.c:80
TInputActionMap m_InputActionMap
Определения AdvancedCommunication.c:4
void TurnOffTransmitter()
Определения AdvancedCommunication.c:52
bool m_ActionsInitialize
Определения AdvancedCommunication.c:5
void AdvancedCommunication()
Определения AdvancedCommunication.c:7
Определения Building.c:6
static bool IsActionLogEnable()
Определения Debug.c:638
Определения Debug.c:594
Определения Land_Lamp_City1_amp.c:2
Определения PlayerBaseClient.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()