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

◆ RemoveAction()

void IsInventoryVisible::RemoveAction ( typename actionName )

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

253{
257
259 {
260 if (!GetGame().IsDedicatedServer())
261 {
262 if(GetGame().GetPlayer())
263 {
264 m_ActionsInitialize = false;
265 }
266 }
267 }
268
269 //HUD
270 /*
271 protected Hud GetHud( PlayerBase player )
272 {
273 if ( !player )
274 {
275 return NULL;
276 }
277
278 return player.m_Hud;
279 }
280
281 void DisplayRadioInfo( string message, PlayerBase player )
282 {
283 Hud hud;
284 if ( player )
285 {
286 hud = GetHud( player );
287 }
288
289 if ( hud )
290 {
291 hud.SetWalkieTalkieText( message );
292 hud.ShowWalkieTalkie( 3 );
293 }
294 }
295 */
296
297 //control transmitter via user actions
298 void TurnOnTransmitter()
299 {
300 GetCompEM().SwitchOn();
301 }
302
303 void TurnOffTransmitter()
304 {
305 GetCompEM().SwitchOff();
306 }
307
308 void InitializeActions()
309 {
311 if(!m_InputActionMap)
312 {
314 m_InputActionMap = iam;
315 SetActions();
316 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
317 }
318 }
319
320 override void GetActions(typename action_input_type, out array<ActionBase_Basic> actions)
321 {
323 {
324 m_ActionsInitialize = true;
326 }
327
328 actions = m_InputActionMap.Get(action_input_type);
329 }
330
331 void SetActions()
332 {
336 }
337
338 void AddAction(typename actionName)
339 {
340 ActionBase action = ActionManagerBase.GetAction(actionName);
341
342 if (!action)
343 {
344 Debug.LogError("Action " + actionName + " dosn't exist!");
345 return;
346 }
347
348 typename ai = action.GetInputType();
349 if (!ai)
350 {
351 m_ActionsInitialize = false;
352 return;
353 }
354
355 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
356
357 if (!action_array)
358 {
359 action_array = new array<ActionBase_Basic>;
360 m_InputActionMap.Insert(ai, action_array);
361 }
362
364 {
365 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action" );
366 }
367 action_array.Insert(action);
368 }
369
370 void RemoveAction(typename actionName)
371 {
372 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
373 ActionBase action = player.GetActionManager().GetAction(actionName);
374 typename ai = action.GetInputType();
375 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
376
377 if (action_array)
378 {
379 action_array.RemoveItem(action);
380 }
381 }
382}
383
385{
386 override bool IsInventoryVisible()
387 {
388 return false;
389 }
390};
391
393{
394 proto native void SwitchOn(bool onOff);
395 proto native bool IsOn();
396};
397
398class StaticTransmitter extends AdvancedCommunication
399{
400 proto native void SwitchOn(bool onOff);
401 proto native bool IsOn();
402 proto native void SetNextChannel();
403 proto native void SetPrevChannel();
404 proto native float GetTunedFrequency();
405 proto native void EnableBroadcast(bool state);
406 proto native void EnableReceive(bool state);
407 proto native bool IsBroadcasting();
408 proto native bool IsReceiving();
409 proto native int GetTunedFrequencyIndex();
410 proto native void SetFrequencyByIndex(int index);
411}
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()

Используется в OnVariablesSynchronized(), ManBase::RemoveAction(), Binoculars::SetActions(), CarDoor::SetActions(), Cauldron::SetActions(), ItemBase::SetActions(), Land_Misc_Through_Static::SetActions(), Mp133Shotgun_Base::SetActions(), Pot::SetActions(), PoweredOptic_Base::SetActions(), RemoteDetonatorTrigger::SetActions(), SetActions(), TentBase::SetActions() и TrapSpawnBase::SetActions().