DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ TurnOffTransmitter()

void IsInventoryVisible::TurnOffTransmitter ( )

См. определение в файле AdvancedCommunication.c строка 185

186{
190
192 {
193 if (!GetGame().IsDedicatedServer())
194 {
195 if(GetGame().GetPlayer())
196 {
197 m_ActionsInitialize = false;
198 }
199 }
200 }
201
202 //HUD
203 /*
204 protected Hud GetHud( PlayerBase player )
205 {
206 if ( !player )
207 {
208 return NULL;
209 }
210
211 return player.m_Hud;
212 }
213
214 void DisplayRadioInfo( string message, PlayerBase player )
215 {
216 Hud hud;
217 if ( player )
218 {
219 hud = GetHud( player );
220 }
221
222 if ( hud )
223 {
224 hud.SetWalkieTalkieText( message );
225 hud.ShowWalkieTalkie( 3 );
226 }
227 }
228 */
229
230 //control transmitter via user actions
231 void TurnOnTransmitter()
232 {
233 GetCompEM().SwitchOn();
234 }
235
236 void TurnOffTransmitter()
237 {
238 GetCompEM().SwitchOff();
239 }
240
241 void InitializeActions()
242 {
244 if(!m_InputActionMap)
245 {
247 m_InputActionMap = iam;
248 SetActions();
249 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
250 }
251 }
252
253 override void GetActions(typename action_input_type, out array<ActionBase_Basic> actions)
254 {
256 {
257 m_ActionsInitialize = true;
259 }
260
261 actions = m_InputActionMap.Get(action_input_type);
262 }
263
264 void SetActions()
265 {
269 }
270
271 void AddAction(typename actionName)
272 {
273 ActionBase action = ActionManagerBase.GetAction(actionName);
274
275 if (!action)
276 {
277 Debug.LogError("Action " + actionName + " dosn't exist!");
278 return;
279 }
280
281 typename ai = action.GetInputType();
282 if (!ai)
283 {
284 m_ActionsInitialize = false;
285 return;
286 }
287
288 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
289
290 if (!action_array)
291 {
292 action_array = new array<ActionBase_Basic>;
293 m_InputActionMap.Insert(ai, action_array);
294 }
295
297 {
298 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action" );
299 }
300 action_array.Insert(action);
301 }
302
303 void RemoveAction(typename actionName)
304 {
305 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
306 ActionBase action = player.GetActionManager().GetAction(actionName);
307 typename ai = action.GetInputType();
308 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
309
310 if (action_array)
311 {
312 action_array.RemoveItem(action);
313 }
314 }
315}
316
318{
319 override bool IsInventoryVisible()
320 {
321 return false;
322 }
323};
324
326{
327 proto native void SwitchOn(bool onOff);
328 proto native bool IsOn();
329};
330
331class StaticTransmitter extends AdvancedCommunication
332{
333 proto native void SwitchOn(bool onOff);
334 proto native bool IsOn();
335 proto native void SetNextChannel();
336 proto native void SetPrevChannel();
337 proto native float GetTunedFrequency();
338 proto native void EnableBroadcast(bool state);
339 proto native void EnableReceive(bool state);
340 proto native bool IsBroadcasting();
341 proto native bool IsReceiving();
342 proto native int GetTunedFrequencyIndex();
343 proto native void SetFrequencyByIndex(int index);
344}
void ActionManagerBase(PlayerBase player)
Определения ActionManagerBase.c:63
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Определения ActionManagerClient.c:1
void AddAction(typename actionName)
Определения AdvancedCommunication.c:220
void RemoveAction(typename actionName)
Определения AdvancedCommunication.c:252
void AdvancedCommunication()
Определения AdvancedCommunication.c:140
TInputActionMap m_InputActionMap
Определения AdvancedCommunication.c:137
void TurnOnTransmitter()
Определения AdvancedCommunication.c:180
void TurnOffTransmitter()
Определения AdvancedCommunication.c:185
bool m_ActionsInitialize
Определения AdvancedCommunication.c:138
class PASBroadcaster extends AdvancedCommunication IsInventoryVisible
Определения AdvancedCommunication.c:135
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Определения AdvancedCommunication.c:202
static ref map< typename, ref TInputActionMap > m_AdvComTypeActionsMap
Определения AdvancedCommunication.c:136
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
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
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()