DayZ 1.24
Loading...
Searching...
No Matches
missionGameplay.c
Go to the documentation of this file.
1class MissionGameplay extends MissionBase
2{
5
7
10
14 ref IngameHud m_Hud;
16 ref LogoutMenu m_Logout;
18
20
21 protected ref GameplayEffectWidgets m_EffectWidgets;
22
24 ref WidgetFadeTimer m_ChatChannelFadeTimer;
25 ref WidgetFadeTimer m_MicFadeTimer;
26
29 NoteMenu m_Note;
30
32 protected const int HOLD_LIMIT_TIME = 300; //ms
33 protected int m_ActionDownTime;
34 protected int m_ActionUpTime;
35 protected bool m_InitOnce;
36 protected bool m_ControlDisabled; //DEPRECATED; disabled mode stored below
37 protected int m_ControlDisabledMode;
38 protected ref array<string> m_ActiveInputExcludeGroups; //exclude groups defined in 'specific.xml' file
39 protected ref array<int> m_ActiveInputRestrictions; //additional scripted restrictions
40 protected bool m_ProcessInputExcludes;
41 protected bool m_QuickbarHold;
42 protected bool m_PlayerRespawning;
43 protected int m_RespawnModeClient; //for client-side usage
44 protected bool m_PauseQueued;
45
46 // von control info
47 protected bool m_VoNActive;
51
53 {
55 m_Initialized = false;
56 m_EffectWidgets = new GameplayEffectWidgets;
57 m_HudRootWidget = null;
58 m_Chat = new Chat;
59 m_ActionMenu = new ActionMenu;
60 m_LifeState = -1;
61 m_Hud = new IngameHud;
62 m_VoNActive = false;
63 m_PauseQueued = false;
64 m_ChatChannelFadeTimer = new WidgetFadeTimer;
65 m_MicFadeTimer = new WidgetFadeTimer;
66 m_ChatChannelHideTimer = new Timer(CALL_CATEGORY_GUI);
67 m_ToggleHudTimer = new Timer(CALL_CATEGORY_GUI);
68
69 m_ActiveRefresherLocations = new array<vector>;
71 }
72
74 {
76#ifndef NO_GUI
77 if (g_Game.GetUIManager() && g_Game.GetUIManager().ScreenFadeVisible())
78 g_Game.GetUIManager().ScreenFadeOut(0);
79 Continue();
80#endif
81 }
82
87
88 override void OnInit()
89 {
90 super.OnInit();
91
92 if (m_Initialized)
93 return;
94
95#ifdef DIAG_DEVELOPER
96 if (!GetGame().IsMultiplayer())//to make it work in single during development
97 {
100 }
101#endif
102
103 PPEffects.Init(); //DEPRECATED, left in for legacy purposes only
105
106 m_UIManager = GetGame().GetUIManager();
107
108 m_Initialized = true;
109
110 // init hud ui
111 if (!m_HudRootWidget)
112 {
113 m_HudRootWidget = GetGame().GetWorkspace().CreateWidgets("gui/layouts/day_z_hud.layout");
114
115 m_HudRootWidget.Show(false);
116
117 m_Chat.Init(m_HudRootWidget.FindAnyWidget("ChatFrameWidget"));
118
119 m_ActionMenu.Init(m_HudRootWidget.FindAnyWidget("ActionsPanel"), TextWidget.Cast(m_HudRootWidget.FindAnyWidget("DefaultActionWidget")));
120
121 m_Hud.Init(m_HudRootWidget.FindAnyWidget("HudPanel"));
122
123 // von enabled icon
124 m_MicrophoneIcon = ImageWidget.Cast(m_HudRootWidget.FindAnyWidget("mic"));
125 m_MicrophoneIcon.Show(false);
126
127 // von voice level
128 m_VoiceLevels = m_HudRootWidget.FindAnyWidget("VoiceLevelsPanel");
129 m_VoiceLevelsWidgets = new map<int, ImageWidget>; // [key] voice level
130 m_VoiceLevelTimers = new map<int, ref WidgetFadeTimer>; // [key] voice level
131
132 if (m_VoiceLevels)
133 {
134 m_VoiceLevelsWidgets.Set(VoiceLevelWhisper, ImageWidget.Cast(m_VoiceLevels.FindAnyWidget("Whisper")));
135 m_VoiceLevelsWidgets.Set(VoiceLevelTalk, ImageWidget.Cast(m_VoiceLevels.FindAnyWidget("Talk")));
136 m_VoiceLevelsWidgets.Set(VoiceLevelShout, ImageWidget.Cast(m_VoiceLevels.FindAnyWidget("Shout")));
137
138 m_VoiceLevelTimers.Set(VoiceLevelWhisper, new WidgetFadeTimer);
139 m_VoiceLevelTimers.Set(VoiceLevelTalk, new WidgetFadeTimer);
140 m_VoiceLevelTimers.Set(VoiceLevelShout, new WidgetFadeTimer);
141 }
142
144
145 // chat channel
146 m_ChatChannelArea = m_HudRootWidget.FindAnyWidget("ChatChannelPanel");
147 m_ChatChannelText = TextWidget.Cast(m_HudRootWidget.FindAnyWidget("ChatChannelText"));
148 }
149
150 // init hud ui
151#ifdef DEVELOPER
152 m_HudDebug = new HudDebug;
153
154 if (!m_HudDebug.IsInitialized())
155 {
156 m_HudDebug.Init(GetGame().GetWorkspace().CreateWidgets("gui/layouts/debug/day_z_hud_debug.layout"));
157 PluginConfigDebugProfile.GetInstance().SetLogsEnabled(LogManager.IsLogsEnable());
158 }
159#endif
160 }
161
163 {
164 return m_UIManager;
165 }
166
167 override void OnMissionStart()
168 {
169 g_Game.SetConnecting(false);
170
171#ifndef FEATURE_CURSOR
173 GetUIManager().ShowUICursor(false);
174#endif
175
176 g_Game.SetMissionState(DayZGame.MISSION_STATE_GAME);
177
178 }
179
181 {
182 if (!m_InventoryMenu)
183 m_InventoryMenu = InventoryMenu.Cast(GetUIManager().CreateScriptedMenu(MENU_INVENTORY, null));
184 }
185
187 {
189
190 if (player)
191 player.OnScheduledTick(timeslice);
192 }
193
195 {
196 if (mute_list && mute_list.Count() > 0)
197 {
198 ScriptRPC rpc = new ScriptRPC();
199 rpc.Write(mute_list);
200 rpc.Send(null, ERPCs.RPC_USER_SYNC_PERMISSIONS, true, null);
201 }
202 }
203
205 {
206 super.UpdateInputDevicesAvailability();
207
208 g_Game.GetInput().UpdateConnectedInputDeviceList();
209 g_Game.UpdateInputDeviceDisconnectWarning();
210 }
211
212 override void OnMissionFinish()
213 {
215
216 //Print("OnMissionFinish");
219
220 m_Chat.Destroy();
221 delete m_HudRootWidget;
222
223 if (m_DebugMonitor)
224 m_DebugMonitor.Hide();
225#ifndef FEATURE_CURSOR
226 g_Game.GetUIManager().ShowUICursor(false);
227#endif
230 g_Game.SetMissionState(DayZGame.MISSION_STATE_FINNISH);
231 }
232
233 override void OnUpdate(float timeslice)
234 {
235#ifdef DIAG_DEVELOPER
237#endif
238
239#ifdef FEATURE_CURSOR
240 if (GetTimeStamp() == 0)
241 {
242 if (!g_Game.IsAppActive() || IsCLIParam("launchPaused"))
243 m_PauseQueued = true;
244 else
245 {
247 GetUIManager().ShowUICursor(false);
248 }
249 }
250#endif
251
252 if (m_PauseQueued && !IsPaused())
253 Pause();
254
255 Man player = GetGame().GetPlayer();
258 UpdateDummyScheduler();//for external entities
259 UIScriptedMenu menu = m_UIManager.GetMenu();
261 NoteMenu note_menu = NoteMenu.Cast(m_UIManager.FindMenu(MENU_NOTE));
262 GesturesMenu gestures_menu = GesturesMenu.Cast(m_UIManager.FindMenu(MENU_GESTURES));
263 RadialQuickbarMenu quickbar_menu = RadialQuickbarMenu.Cast(m_UIManager.FindMenu(MENU_RADIAL_QUICKBAR));
264 InspectMenuNew inspect = InspectMenuNew.Cast(m_UIManager.FindMenu(MENU_INSPECT));
265 Input input = GetGame().GetInput();
266 ActionBase runningAction;
267 bool manualInputUnlockProcessed = false;
268
269 if (playerPB)
270 {
271#ifdef DIAG_DEVELOPER
272 if (DiagMenu.GetBool(DiagMenuIDs.MISC_HOLOGRAM))
273 DbgUI.Begin("Hologram Debug", 5, 5);
274#endif
275
276 if (playerPB.GetHologramLocal())
277 playerPB.GetHologramLocal().UpdateHologram(timeslice);
278#ifdef DIAG_DEVELOPER
279 else if (DiagMenu.GetBool(DiagMenuIDs.MISC_HOLOGRAM))
280 DbgUI.Text("No active Hologram");
281
282 if (DiagMenu.GetBool(DiagMenuIDs.MISC_HOLOGRAM))
283 DbgUI.End();
284#endif
285
286 runningAction = playerPB.GetActionManager().GetRunningAction();
287 }
288
289#ifdef PLATFORM_CONSOLE
290 //'Special behaviour' for colliding VON distance input actions [CONSOLE ONLY]
291 if (GetUApi().GetInputByID(UAVoiceModifierHelper).LocalValue() && !menu)
292 {
293 GetUApi().GetInputByID(UAUIQuickbarRadialOpen).Lock();
294 GetUApi().GetInputByID(UAZoomInToggle).Lock();
295 GetUApi().GetInputByID(UAPersonView).Lock();
296 GetUApi().GetInputByID(UALeanLeft).Lock();
297 GetUApi().GetInputByID(UALeanRight).Lock();
298 }
299 else if (GetUApi().GetInputByID(UAVoiceModifierHelper).LocalRelease()) //unlocks on release, if already excluded, all the other inputs should be locked/unlocked in the exclude (if defined properly!)
300 {
301 GetUApi().GetInputByID(UAUIQuickbarRadialOpen).Unlock();
302 GetUApi().GetInputByID(UAZoomInToggle).Unlock();
303 GetUApi().GetInputByID(UAPersonView).Unlock();
304 GetUApi().GetInputByID(UALeanLeft).Unlock();
305 GetUApi().GetInputByID(UALeanRight).Unlock();
306
308 }
309
310 //Radial quickbar
311 if (GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalPress() && playerPB)
312 {
313 //open quickbar menu
314 if (playerPB.IsAlive() && !playerPB.IsRaised() && !playerPB.IsUnconscious() && !playerPB.GetCommand_Vehicle()) //player hands not raised, player is not in prone and player is not interacting with vehicle
315 {
316 if (!GetUIManager().IsMenuOpen(MENU_RADIAL_QUICKBAR))
317 {
318 RadialQuickbarMenu.OpenMenu();
319 m_Hud.ShowHudUI(false);
320 }
321 }
322 }
323
324 bool b1 = RadialQuickbarMenu.GetItemToAssign() != null;
325 //close quickbar menu from world
326 if (GetUIManager().IsMenuOpen(MENU_RADIAL_QUICKBAR) && (!RadialQuickbarMenu.GetMenuInstance().GetParentMenu() || RadialQuickbarMenu.GetMenuInstance().GetParentMenu() != inventory) && (GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalRelease() || !GetUApi().GetInputByID(UAUIQuickbarRadialOpen).LocalValue()))
327 {
328 RadialQuickbarMenu.CloseMenu();
329 m_Hud.ShowHudUI(true);
330 }
331
332 //Radial Quickbar from inventory
333 if ((RadialQuickbarMenu.instance && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() && RadialQuickbarMenu.GetMenuInstance().GetParentMenu() == inventory) && GetUApi().GetInputByID(UAUIQuickbarRadialInventoryOpen).LocalRelease())
334 {
335 //close radial quickbar menu
336 if (GetGame().GetUIManager().IsMenuOpen(MENU_RADIAL_QUICKBAR))
337 {
338 RadialQuickbarMenu.CloseMenu();
339 RadialQuickbarMenu.SetItemToAssign(NULL);
340 AddActiveInputExcludes({"inventory"});
342 }
343 }
344
345 if (playerPB)
346 {
347 //Special behaviour for leaning [CONSOLE ONLY]
348 if (playerPB.IsRaised() || playerPB.IsInRasedProne())
349 {
350 GetUApi().GetInputByID(UALeanLeftGamepad).Unlock();
351 GetUApi().GetInputByID(UALeanRightGamepad).Unlock();
352
354 }
355 else if (!GetUApi().GetInputByID(UALeanLeftGamepad).IsLocked() || !GetUApi().GetInputByID(UALeanRightGamepad).IsLocked())
356 {
357 GetUApi().GetInputByID(UALeanLeftGamepad).Lock();
358 GetUApi().GetInputByID(UALeanRightGamepad).Lock();
359 }
360
361 //Special behaviour for freelook & zeroing [CONSOLE ONLY]
362 if (playerPB.IsRaised())
363 {
364 GetUApi().GetInputByID(UALookAround).Lock(); //disable freelook
365 GetUApi().GetInputByID(UALookAroundToggle).Lock(); //disable freelook
366
367 GetUApi().GetInputByID(UAZeroingUp).Unlock(); //enable zeroing
368 GetUApi().GetInputByID(UAZeroingDown).Unlock();
369
371 }
372 else if (GetUApi().GetInputByID(UALookAround).IsLocked() || GetUApi().GetInputByID(UALookAroundToggle).IsLocked())
373 {
374 GetUApi().GetInputByID(UALookAround).Unlock(); //enable freelook
375 GetUApi().GetInputByID(UALookAroundToggle).Unlock(); //enable freelook
376
377 GetUApi().GetInputByID(UAZeroingUp).Lock(); //disable zeroing
378 GetUApi().GetInputByID(UAZeroingDown).Lock();
379
381 }
382 }
383#endif
384
387
388 //Gestures
389 if (GetUApi().GetInputByID(UAUIGesturesOpen).LocalPress() && playerPB)
390 {
391 //open gestures menu
392 if (!playerPB.IsRaised() && (playerPB.GetActionManager().ActionPossibilityCheck(playerPB.m_MovementState.m_CommandTypeId) || playerPB.IsEmotePlaying()) && !playerPB.GetCommand_Vehicle())
393 {
394 if (!GetUIManager().IsMenuOpen(MENU_GESTURES))
395 {
396 GesturesMenu.OpenMenu();
397 m_Hud.ShowHudUI(false);
398 }
399 }
400 }
401
402 if (GetUApi().GetInputByID(UAUIGesturesOpen).LocalRelease() || GetUApi().GetInputByID(UAUIGesturesOpen).LocalValue() == 0)
403 {
404 //close gestures menu
405 if (GetUIManager().IsMenuOpen(MENU_GESTURES))
406 {
407 GesturesMenu.CloseMenu();
408 m_Hud.ShowHudUI(true);
409 }
410 }
411
412 if (player && m_LifeState == EPlayerStates.ALIVE && !player.IsUnconscious())
413 {
414 // enables HUD on spawn
415 if (m_HudRootWidget)
416 m_HudRootWidget.Show(true);
417
418#ifndef NO_GUI
419 // fade out black screen
420
421 if (GetUIManager().ScreenFadeVisible())
423
424#endif
425
426 if (GetUApi().GetInputByID(UAGear).LocalPress())
427 {
428 if (!inventory && playerPB.CanManipulateInventory() && IsMapUnfoldActionRunning(runningAction))
429 {
432 }
433 else if (menu == inventory)
435 }
436
437 if (GetUApi().GetInputByID(UAUIMenu).LocalPress() && menu && inventory && menu == inventory)
439
440#ifndef PLATFORM_CONSOLE
441 if (GetUApi().GetInputByID(UAChat).LocalPress() && input.IsEnabledMouseAndKeyboardEvenOnServer())
442 {
443 ChatInputMenu chat = ChatInputMenu.Cast(m_UIManager.FindMenu(MENU_CHAT));
444 if (menu == NULL)
445 ShowChat();
446 }
447#endif
448
449 // voice level updated
450 VONManager.GetInstance().HandleInput(input);
451
452 if (GetUApi().GetInputByID(UAUIQuickbarToggle).LocalHold())
453 {
454 if (!m_QuickbarHold)
455 {
456 m_QuickbarHold = true;
458 }
459 }
460
461 if (GetUApi().GetInputByID(UAUIQuickbarToggle).LocalRelease())
462 {
463 if (!m_QuickbarHold)
465 m_QuickbarHold = false;
466 }
467
468 if (GetUApi().GetInputByID(UAZeroingUp).LocalPress() || GetUApi().GetInputByID(UAZeroingDown).LocalPress() || GetUApi().GetInputByID(UAToggleWeapons).LocalPress())
470
471 if (menu == NULL)
472 {
473 m_ActionMenu.Refresh();
474
475 if (GetUApi().GetInputByID(UANextActionCategory).LocalPress())
476 m_ActionMenu.NextActionCategory();
477 else if (GetUApi().GetInputByID(UAPrevActionCategory).LocalPress())
478 m_ActionMenu.PrevActionCategory();
479 else if (GetUApi().GetInputByID(UANextAction).LocalPress())
480 m_ActionMenu.NextAction();
481 else if (GetUApi().GetInputByID(UAPrevAction).LocalPress())
482 m_ActionMenu.PrevAction();
483 }
484 else
485 m_ActionMenu.Hide();
486
487 //hologram rotation
488 if (menu == NULL && playerPB.IsPlacingLocal() && playerPB.GetHologramLocal().GetParentEntity().PlacementCanBeRotated())
489 {
490 if (GetUApi().GetInputByID(UANextAction).LocalRelease())
491 playerPB.GetHologramLocal().SubtractProjectionRotation(15);
492
493 if (GetUApi().GetInputByID(UAPrevAction).LocalRelease())
494 playerPB.GetHologramLocal().AddProjectionRotation(15);
495 }
496
498 {
499 if (GetUApi().GetInputByID(UAMapToggle).LocalPress() && !m_UIManager.GetMenu())
500 {
503 }
504 }
505 }
506
507 // life state check
508 if (player)
509 {
510 int life_state = player.GetPlayerState();
511
512 // life state changed
513 if (m_LifeState != life_state)
514 {
515 m_LifeState = life_state;
516
517 if (m_LifeState != EPlayerStates.ALIVE && !player.IsUnconscious())
519 }
520 }
521
522 if (menu && !menu.UseKeyboard() && menu.UseMouse())
523 {
524 int i;
525 for (i = 0; i < 5; i++)
526 {
527 input.DisableKey(i | INPUT_DEVICE_MOUSE);
530 }
531
532 for (i = 0; i < 6; i++)
533 input.DisableKey(i | INPUT_DEVICE_MOUSE_AXIS);
534 }
535
536 if (!m_UIManager.IsDialogVisible())
537 {
538 if (menu)
539 {
540 if (menu == inspect)
541 {
542 if (GetUApi().GetInputByID(UAGear).LocalPress())
543 {
544 if (ItemManager.GetInstance().GetSelectedItem() == NULL)
546 }
547 else if (GetUApi().GetInputByID(UAUIBack).LocalPress())
548 {
549 if (ItemManager.GetInstance().GetSelectedItem() == NULL)
551 }
552 }
553 else if (menu == note_menu && (!IsInputExcludeActive("inventory") || !IsInputRestrictionActive(EInputRestrictors.INVENTORY)))
554 {
555 AddActiveInputExcludes({"inventory"});
557 }
558 else if (menu == gestures_menu && !gestures_menu.IsMenuClosing() && !IsInputExcludeActive("radialmenu"))
559 {
560 AddActiveInputExcludes({"radialmenu"});
561 GetUApi().GetInputByID(UAUIGesturesOpen).Unlock();
562 }
563 else if (menu == quickbar_menu && !quickbar_menu.IsMenuClosing() && !IsInputExcludeActive("radialmenu"))
564 {
565 AddActiveInputExcludes({"radialmenu"});
566 GetUApi().GetInputByID(UAUIQuickbarRadialOpen).Unlock();
567 }
568 else if (IsPaused())
569 {
570 InGameMenuXbox menu_xb = InGameMenuXbox.Cast(GetGame().GetUIManager().GetMenu());
571 if (!g_Game.GetUIManager().ScreenFadeVisible() && (!menu_xb || !menu_xb.IsOnlineOpen()))
572 {
573 if (GetUApi().GetInputByID(UAUIMenu).LocalPress())
574 Continue();
575 else if (GetUApi().GetInputByID(UAUIBack).LocalPress())
576 Continue();
577 }
578 else if (GetUApi().GetInputByID(UAUIBack).LocalPress())
579 {
580 if (menu_xb && menu_xb.IsOnlineOpen())
581 menu_xb.CloseOnline();
582 }
583 }
584 }
585 else if (GetUApi().GetInputByID(UAUIMenu).LocalPress())
586 {
588 Pause();
589 }
590 }
591
593
595
596 if (!GetGame().IsMultiplayer())
597 m_WorldData.UpdateBaseEnvTemperature(timeslice);
598
599#ifdef DIAG_DEVELOPER
601#endif
602 if (m_ProcessInputExcludes)
603 {
605 m_ProcessInputExcludes = false;
606 }
607
608 super.OnUpdate(timeslice);
609 }
610
611 override void OnKeyPress(int key)
612 {
613 super.OnKeyPress(key);
615 }
616
617 override void OnKeyRelease(int key)
618 {
619 super.OnKeyRelease(key);
620 }
621
623 {
624 super.OnEvent(eventTypeId, params);
626 Man player = GetGame().GetPlayer();
627
628 switch (eventTypeId)
629 {
632 if (m_LifeState == EPlayerStates.ALIVE)
633 m_Chat.Add(chat_params);
634 break;
635
638 ChatInputMenu chatMenu = ChatInputMenu.Cast(GetUIManager().FindMenu(MENU_CHAT_INPUT));
639 if (chatMenu)
640 chatMenu.UpdateChannel();
641 else
642 {
643 m_ChatChannelText.SetText(ChatInputMenu.GetChannelName(cc_params.param1));
644 m_ChatChannelFadeTimer.FadeIn(m_ChatChannelArea, 0.5, true);
645 m_ChatChannelHideTimer.Run(2, m_ChatChannelFadeTimer, "FadeOut", new Param3<Widget, float, bool>(m_ChatChannelArea, 0.5, true));
646 }
647 break;
648
652
653 break;
654
657 PluginDeveloper plugin_developer = PluginDeveloper.Cast(GetPlugin(PluginDeveloper));
658 plugin_developer.OnSetFreeCameraEvent(PlayerBase.Cast(player), set_free_camera_event_params.param1);
659 break;
660 }
661 }
662
663 override void OnItemUsed(InventoryItem item, Man owner)
664 {
665 if (item && GetUIManager().GetMenu() == NULL)
666 {
667 if (item.IsInherited(ItemBook))
668 {
669 BookMenu bookMenu = BookMenu.Cast(GetUIManager().EnterScriptedMenu(MENU_BOOK, NULL));
670 if (bookMenu)
671 bookMenu.ReadBook(item);
672 }
673 }
674 }
675
676#ifdef DEVELOPER
677 override void SetInputSuppression(bool state)
678 {
680 }
681
682 override bool GetInputSuppression()
683 {
684 return m_SuppressNextFrame;
685 }
686#endif
687
690 {
691 super.PlayerControlEnable(bForceSupress);
692
693 if (m_ControlDisabledMode != -1)
694 {
695 switch (m_ControlDisabledMode)
696 {
698 {
700 break;
701 }
703 {
706 break;
707 }
709 {
710 RemoveActiveInputExcludes({"loopedactions"}, bForceSupress);
712 break;
713 }
715 {
717 break;
718 }
720 {
722 break;
723 }
724 }
725
726 m_ControlDisabledMode = -1;
727
729 if (player)
730 {
731 HumanInputController hic = player.GetInputController();
732 hic.LimitsDisableSprint(false);
733 }
734 }
735 }
736
738 override void PlayerControlDisable(int mode)
739 {
740 super.PlayerControlDisable(mode);
741
742 switch (mode)
743 {
745 {
746 AddActiveInputExcludes({"menu"});
747 break;
748 }
750 {
751 AddActiveInputExcludes({"inventory"});
753 break;
754 }
756 {
757 AddActiveInputExcludes({"loopedactions"});
759 break;
760 }
762 {
763 AddActiveInputExcludes({"radialmenu"});
764 break;
765 }
767 {
768 AddActiveInputExcludes({"radialmenu"});
769 break;
770 }
771 default:
772 {
773 Debug.Log("Unknown controls disable mode");
774 return;
775 }
776 }
777
778 m_ControlDisabledMode = mode;
779
781 if (player)
782 {
783 ItemBase item = player.GetItemInHands();
784 if (item && item.IsWeapon())
785 player.RequestResetADSSync();
786 }
787 }
788
791 {
792 super.RemoveActiveInputExcludes(excludes, bForceSupress);
793
794 if (excludes.Count() != 0)
795 {
796 bool changed = false;
797
798 if (m_ActiveInputExcludeGroups)
799 {
800 for (int i = 0; i < excludes.Count(); i++)
801 {
802 if (m_ActiveInputExcludeGroups.Find(excludes[i]) != -1)
803 {
804 m_ActiveInputExcludeGroups.RemoveItem(excludes[i]);
805 changed = true;
806 }
807 }
808
809 if (changed)
811 }
812
813 // supress control for next frame
814 GetUApi().SupressNextFrame(bForceSupress);
815 }
816 }
817
820 {
821 //unique behaviour outside regular excludes
822 if (restrictor > -1)
823 {
824 switch (restrictor)
825 {
826 case EInputRestrictors.INVENTORY:
827 {
828 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(false); // force walk off!
829 break;
830 }
831 case EInputRestrictors.MAP:
832 {
833 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(false); // force walk off!
834 break;
835 }
836 }
837
838 if (m_ActiveInputRestrictions && m_ActiveInputRestrictions.Find(restrictor) != -1)
839 m_ActiveInputRestrictions.RemoveItem(restrictor);
840 }
841 }
842
845 {
846 super.AddActiveInputExcludes(excludes);
847
848 if (excludes.Count() != 0)
849 {
850 bool changed = false;
851 if (!m_ActiveInputExcludeGroups)
852 m_ActiveInputExcludeGroups = new array<string>;
853
854 for (int i = 0; i < excludes.Count(); i++)
855 {
856 if (m_ActiveInputExcludeGroups.Find(excludes[i]) == -1)
857 {
858 m_ActiveInputExcludeGroups.Insert(excludes[i]);
859 changed = true;
860 }
861 }
862
863 if (changed)
864 {
866#ifdef BULDOZER
867 GetUApi().SupressNextFrame(true);
868#endif
869 }
870 }
871 }
872
875 {
876 //unique behaviour outside regular excludes
877 if (restrictor > -1)
878 {
879 switch (restrictor)
880 {
881 case EInputRestrictors.INVENTORY:
882 {
883 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(true); // force walk on!
885 if (player)
886 {
887 ItemBase item = player.GetItemInHands();
888 if (item && item.IsWeapon())
889 player.RequestResetADSSync();
890 }
891 break;
892 }
893 case EInputRestrictors.MAP:
894 {
895 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(true); // force walk on!
896 break;
897 }
898 }
899
900 if (!m_ActiveInputRestrictions)
901 m_ActiveInputRestrictions = new array<int>;
902 if (m_ActiveInputRestrictions.Find(restrictor) == -1)
903 m_ActiveInputRestrictions.Insert(restrictor);
904 }
905 }
906
908 override void RefreshExcludes()
909 {
910 m_ProcessInputExcludes = true;
911 }
912
914 protected void PerformRefreshExcludes()
915 {
916 if (m_ActiveInputExcludeGroups)
917 {
918 for (int i = 0; i < m_ActiveInputExcludeGroups.Count(); i++)
919 GetUApi().ActivateExclude(m_ActiveInputExcludeGroups[i]);
920 }
921
922 GetUApi().UpdateControls();
923 }
924
926 override void EnableAllInputs(bool bForceSupress = false)
927 {
928 m_ControlDisabledMode = -1;
929
930 if (m_ActiveInputRestrictions)
931 {
932 int count = m_ActiveInputRestrictions.Count();
933 for (int i = 0; i < count; i++)
934 RemoveActiveInputRestriction(m_ActiveInputRestrictions[0]);
935 m_ActiveInputRestrictions.Clear(); //redundant?
936 }
937 if (m_ActiveInputExcludeGroups)
938 m_ActiveInputExcludeGroups.Clear();
939
940 GetUApi().UpdateControls(); //it is meant to happen instantly, does not wait for update to process
941 GetUApi().SupressNextFrame(bForceSupress); // supress control for next frame
942 }
943
945 override bool IsControlDisabled()
946 {
947 bool active = false;
948 if (m_ActiveInputExcludeGroups)
949 active |= m_ActiveInputExcludeGroups.Count() > 0;
950 if (m_ActiveInputRestrictions)
951 active |= m_ActiveInputRestrictions.Count() > 0;
952 active |= m_ControlDisabledMode >= INPUT_EXCLUDE_ALL; //legacy stuff, Justin case
953 return active;
954 }
955
957 override bool IsInputExcludeActive(string exclude)
958 {
959 return m_ActiveInputExcludeGroups && m_ActiveInputExcludeGroups.Find(exclude) != -1;
960 }
961
964 {
965 return m_ActiveInputRestrictions && m_ActiveInputRestrictions.Find(restriction) != -1;
966 }
967
970 {
972 }
973
975 {
977 }
978
979
981 {
982 if (GetUIManager())
983 {
986 }
987
989
990 if (m_Chat)
991 m_Chat.Clear();
992 }
993
995 {
996#ifdef PLATFORM_CONSOLE
997 IngameHud hud = IngameHud.Cast(GetHud());
998 if (hud)
999 {
1000 if (inv_open)
1001 hud.GetHudPanelWidget().SetPos(0, -0.055);
1002 else
1003 hud.GetHudPanelWidget().SetPos(0, 0);
1004 }
1005#endif
1006 }
1007
1008 override void ShowInventory()
1009 {
1011
1012 if (!menu && GetGame().GetPlayer().GetHumanInventory().CanOpenInventory() && !GetGame().GetPlayer().IsInventorySoftLocked())
1013 {
1014 if (!m_InventoryMenu)
1015 InitInventory();
1016
1017 if (!GetUIManager().FindMenu(MENU_INVENTORY))
1018 {
1019 GetUIManager().ShowScriptedMenu(m_InventoryMenu, null);
1020 PlayerBase.Cast(GetGame().GetPlayer()).OnInventoryMenuOpen();
1021 }
1022 AddActiveInputExcludes({"inventory"});
1024 }
1025 }
1026
1027 override void HideInventory()
1028 {
1029 if (m_InventoryMenu)
1030 {
1031 GetUIManager().HideScriptedMenu(m_InventoryMenu);
1032 RemoveActiveInputExcludes({"inventory"}, false);
1034 PlayerBase.Cast(GetGame().GetPlayer()).OnInventoryMenuClose();
1035 VicinityItemManager.GetInstance().ResetRefreshCounter();
1036 }
1037 }
1038
1040 {
1041 if (m_InventoryMenu)
1042 {
1043 if (!m_InventoryMenu.GetParentMenu() && GetUIManager().GetMenu() != m_InventoryMenu)
1044 {
1045 m_InventoryMenu.SetParentMenu(GetUIManager().GetMenu()); //hack; guarantees the 'm_pCurrentMenu' will be set to whatever is on top currently
1046 }
1047 m_InventoryMenu.Close();
1048 m_InventoryMenu = NULL;
1049 }
1050 }
1051
1052 override void ResetGUI()
1053 {
1055 InitInventory();
1056 }
1057
1058 override void ShowChat()
1059 {
1060 m_ChatChannelHideTimer.Stop();
1061 m_ChatChannelFadeTimer.Stop();
1062 m_ChatChannelArea.Show(false);
1064
1065 int level = GetGame().GetVoiceLevel();
1067
1068 AddActiveInputExcludes({"menu"});
1069 }
1070
1071 override void HideChat()
1072 {
1073 RemoveActiveInputExcludes({"menu"}, true);
1074 }
1075
1077 {
1078 if (GetHud())
1079 GetHud().ShowVehicleInfo();
1080 }
1081
1083 {
1084 if (GetHud())
1085 GetHud().HideVehicleInfo();
1086 }
1087
1088 override Hud GetHud()
1089 {
1090 return m_Hud;
1091 }
1092
1094 {
1095 return m_HudDebug;
1096 }
1097
1099 {
1100 if (GetHudDebug())
1101 GetHudDebug().RefreshCrosshairVisibility();
1102 }
1103
1105 {
1106 if (GetHudDebug())
1107 GetHudDebug().HideCrosshairVisibility();
1108 }
1109
1110 override bool IsPaused()
1111 {
1112 return GetGame().GetUIManager().IsMenuOpen(MENU_INGAME);
1113 }
1114
1115 override void Pause()
1116 {
1117 if (IsPaused() || (GetGame().GetUIManager().GetMenu() && GetGame().GetUIManager().GetMenu().GetID() == MENU_INGAME))
1118 return;
1119
1120 m_PauseQueued = true;
1121
1122 if (g_Game.IsClient() && g_Game.GetGameState() != DayZGameState.IN_GAME)
1123 return;
1124
1126 if (player && !player.IsPlayerLoaded() || IsPlayerRespawning())
1127 return;
1128
1129 CloseAllMenus();
1130
1131 // open ingame menu
1133 if (!menu || !menu.IsVisible())
1134 return;
1135
1136 AddActiveInputExcludes({"menu"});
1138
1139 m_PauseQueued = false;
1140 }
1141
1142 override void Continue()
1143 {
1144 UIScriptedMenu menu = GetGame().GetUIManager().GetMenu();
1145 if (!menu)
1146 return;
1147
1148 int menu_id = menu.GetID();
1149 if (!IsPaused() || (menu_id != MENU_INGAME && menu_id != MENU_LOGOUT && menu_id != MENU_RESPAWN_DIALOGUE) || (m_Logout && m_Logout.layoutRoot.IsVisible()))
1150 return;
1151
1152 RemoveActiveInputExcludes({"menu"}, true);
1155 }
1156
1157 override bool IsMissionGameplay()
1158 {
1159 return true;
1160 }
1161
1162 override void AbortMission()
1163 {
1164#ifdef BULDOZER
1165 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(g_Game.RequestExit, IDC_MAIN_QUIT);
1166#else
1167 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(GetGame().AbortMission);
1168#endif
1169 }
1170
1171 override void CreateLogoutMenu(UIMenuPanel parent)
1172 {
1174
1175 // do not show logout screen if player's dead
1176 if (!player || player.IsDamageDestroyed())
1177 {
1178 // exit the game immediately
1179 AbortMission();
1180 return;
1181 }
1182
1183 if (parent)
1184 {
1185 m_Logout = LogoutMenu.Cast(parent.EnterScriptedMenu(MENU_LOGOUT));
1186
1187 if (m_Logout)
1188 m_Logout.SetLogoutTime();
1189 }
1190 }
1191
1192 override void StartLogoutMenu(int time)
1193 {
1194 if (m_Logout)
1195 {
1196 if (time > 0)
1197 {
1198 // character will be deleted from server int "time" seconds
1199 m_Logout.SetTime(time);
1200 m_Logout.Show();
1201
1202 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(m_Logout.UpdateTime, 1000, true);
1203 }
1204 else
1205 {
1206 // no waiting time -> player is most likely dead
1207 m_Logout.Exit();
1208 }
1209 }
1210 }
1211
1212 override void CreateDebugMonitor()
1213 {
1214 if (!m_DebugMonitor)
1215 {
1216 m_DebugMonitor = new DebugMonitor();
1217 m_DebugMonitor.Init();
1218 }
1219 else
1220 m_DebugMonitor.Show();
1221
1222 }
1223 override void HideDebugMonitor()
1224 {
1225 if (m_DebugMonitor)
1226 m_DebugMonitor.Hide();
1227 }
1228
1230 {
1231 UIManager um = GetGame().GetUIManager();
1232 if (um && !um.IsMenuOpen(MENU_MAP))
1233 {
1234 um.CloseAll();
1236 {
1237 um.EnterScriptedMenu(MENU_MAP, null);
1238 GetGame().GetMission().AddActiveInputExcludes({"map"});
1239 GetGame().GetMission().AddActiveInputRestriction(EInputRestrictors.MAP);
1240 }
1241 }
1242 }
1243
1244 protected bool IsMapUnfoldActionRunning(ActionBase pAction)
1245 {
1246 return !pAction || pAction.Type() != ActionUnfoldMap;
1247 }
1248
1249 /*void ChangeBleedingIndicatorVisibility(bool visible)
1250 {
1251 PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() );
1252 if (player)
1253 {
1254 BleedingSourcesManagerRemote manager = player.GetBleedingManagerRemote();
1255 if (manager && manager.GetBleedingSourcesCount() > 0)
1256 {
1257 manager.ChangeBleedingIndicatorVisibility(visible);
1258 }
1259 }
1260 }*/
1261
1263 {
1264 if (!m_DebugMonitor) return;
1265
1267 if (player)
1268 {
1269 DebugMonitorValues values = player.GetDebugMonitorValues();
1270 if (values)
1271 {
1272 m_DebugMonitor.SetHealth(values.GetHealth());
1273 m_DebugMonitor.SetBlood(values.GetBlood());
1274 m_DebugMonitor.SetLastDamage(values.GetLastDamage());
1275 m_DebugMonitor.SetPosition(MiscGameplayFunctions.TruncateVec(player.GetPosition(), 1));
1276 }
1277 }
1278 }
1279
1281 {
1282 m_ActionDownTime = time_down;
1283 }
1284
1286 {
1287 m_ActionUpTime = time_up;
1288 }
1289
1291 {
1292 return m_ActionDownTime;
1293 }
1294
1296 {
1297 return m_ActionUpTime;
1298 }
1299
1301 {
1303 return hold_action_time;
1304 }
1305
1307 {
1308#ifndef SERVER
1309 ShowHairDebugValues(DiagMenu.GetBool(DiagMenuIDs.MISC_HAIR_DISPLAY_DEBUG));
1310#endif
1311 }
1312
1314 {
1315#ifdef DIAG_DEVELOPER
1316 if (state)
1317 {
1319
1320 int i = DiagMenu.GetValue(DiagMenuIDs.MISC_HAIR_LEVEL);
1321 bool bState = diagmenu.m_HairHidingStateMap.Get(i);
1322 string selectionState;
1323 if (!bState)
1324 selectionState = "Hidden";
1325 else
1326 selectionState = "Shown";
1327 string selectionName = diagmenu.m_HairSelectionArray.Get(i);
1328
1330 DbgUI.Begin("Hair Debug", 50, 150);
1331 DbgUI.Text("Current Hair Selection:" + selectionName);
1332 DbgUI.Text("State: " + selectionState);
1333
1334 DbgUI.End();
1336 }
1337 else
1338 {
1340 DbgUI.Begin("Hair Debug", 50, 50);
1341 DbgUI.End();
1343 }
1344#endif
1345 }
1346
1348 {
1349 for (int n = 0; n < m_VoiceLevelsWidgets.Count(); n++)
1350 {
1351 int voiceKey = m_VoiceLevelsWidgets.GetKey(n);
1352 ImageWidget voiceWidget = m_VoiceLevelsWidgets.Get(n);
1353
1354 // stop fade timer since it will be refreshed
1355 WidgetFadeTimer timer = m_VoiceLevelTimers.Get(n);
1356 timer.Stop();
1357
1358 // show widgets according to the level
1359 if (voiceKey <= level)
1360 {
1361 voiceWidget.SetAlpha(1.0); // reset from possible previous fade out
1362 voiceWidget.Show(true);
1363
1364 if (!m_VoNActive && !GetUIManager().FindMenu(MENU_CHAT_INPUT))
1365 timer.FadeOut(voiceWidget, 3.0);
1366 }
1367 else
1368 voiceWidget.Show(false);
1369 }
1370
1371 // fade out microphone icon when switching levels without von on
1372 if (!m_VoNActive)
1373 {
1374 if (!GetUIManager().FindMenu(MENU_CHAT_INPUT))
1375 {
1376 m_MicrophoneIcon.SetAlpha(1.0);
1377 m_MicrophoneIcon.Show(true);
1378
1379 m_MicFadeTimer.FadeOut(m_MicrophoneIcon, 3.0);
1380 }
1381 }
1382 else
1383 {
1384 // stop mic icon fade timer when von is activated
1385 m_MicFadeTimer.Stop();
1386 }
1387 }
1388
1390 {
1391 return m_MicrophoneIcon;
1392 }
1393
1394 override WidgetFadeTimer GetMicWidgetFadeTimer()
1395 {
1396 return m_MicFadeTimer;
1397 }
1398
1403
1408
1409 override bool IsVoNActive()
1410 {
1411 return m_VoNActive;
1412 }
1413
1414 override void SetVoNActive(bool active)
1415 {
1416 m_VoNActive = active;
1417 }
1418
1420 {
1421 for (int n = 0; n < m_VoiceLevelsWidgets.Count(); n++)
1422 {
1423 ImageWidget voiceWidget = m_VoiceLevelsWidgets.Get(n);
1424 voiceWidget.Show(false);
1425 }
1426 }
1427
1429 {
1430 return m_Note;
1431 };
1432
1434 {
1435 m_Note = NoteMenu.Cast(menu);
1436 };
1437
1438 override void OnPlayerRespawned(Man player)
1439 {
1440#ifdef DIAG_DEVELOPER
1441 if (m_HudDebug)
1442 m_HudDebug.RefreshByLocalProfile();
1443#endif
1444
1446 if (playerBase)
1447 GetGame().GetCallQueue(CALL_CATEGORY_GUI).Call(playerBase.ShowDeadScreen, false, 0);
1448
1449 GetGame().GetSoundScene().SetSoundVolume(g_Game.m_volume_sound, 1);
1450 GetGame().GetSoundScene().SetSpeechExVolume(g_Game.m_volume_speechEX, 1);
1451 GetGame().GetSoundScene().SetMusicVolume(g_Game.m_volume_music, 1);
1452 GetGame().GetSoundScene().SetVOIPVolume(g_Game.m_volume_VOIP, 1);
1453 GetGame().GetSoundScene().SetRadioVolume(g_Game.m_volume_radio, 1);
1454 }
1455
1456 override void SetPlayerRespawning(bool state)
1457 {
1458 m_PlayerRespawning = state;
1459 }
1460
1461 override bool IsPlayerRespawning()
1462 {
1463 return m_PlayerRespawning;
1464 }
1465
1467 {
1468 return m_ActiveRefresherLocations;
1469 }
1470
1471 override void SetRespawnModeClient(int mode)
1472 {
1473 m_RespawnModeClient = mode;
1474 }
1475
1477 {
1478 return m_RespawnModeClient;
1479 }
1480
1481 override GameplayEffectWidgets GetEffectWidgets()
1482 {
1483 return m_EffectWidgets;
1484 }
1485
1487 {
1488 if (!m_OnConnectivityChanged)
1489 m_OnConnectivityChanged = new ScriptInvoker();
1491 }
1492}
ActionUnfoldMapCB ActionBaseCB ActionUnfoldMap()
DayZGame g_Game
Definition DayZGame.c:3528
Hud m_Hud
DiagMenuIDs
Definition EDiagMenuIDs.c:2
EPlayerStates
ERPCs
Definition ERPCs.c:2
int GetID()
Get the ID registered in SEffectManager.
Definition Effect.c:517
void HudDebug()
Definition HudDebug.c:104
void InventoryMenu()
bool IsLocked()
PlayerBase GetPlayer()
PPERequesterCategory
PluginBase GetPlugin(typename plugin_type)
proto native UAInputAPI GetUApi()
bool m_Initialized
static bool GetMapIgnoreMapOwnership()
Definition Chat.c:15
Definition DbgUI.c:60
Definition Debug.c:14
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:133
void ShowQuickbarPlayer(bool show)
void OnResizeScreen()
bool IsHideHudPlayer()
Definition IngameHud.c:1084
void ZeroingKeyPress()
Definition IngameHud.c:754
void ShowHudUI(bool show)
void ShowHudPlayer(bool show)
bool IsHideQuickbarPlayer()
Definition IngameHud.c:1079
void Init(Widget hud_panel_widget)
Definition gameplay.c:623
bool KeyPress(int key)
Definition IngameHud.c:749
Definition input.c:11
static ItemManager GetInstance()
static bool IsLogsEnable()
Definition Debug.c:709
static void Init()
void ~MissionGameplay()
UIManager GetUIManager()
override void EnableAllInputs(bool bForceSupress=false)
Removes all active input excludes and restrictions.
override void CreateDebugMonitor()
override void PlayerControlEnable(bool bForceSupress)
Deprecated; removes last input exclude and associated controls restrictions.
HudDebug GetHudDebug()
ref array< int > m_ActiveInputRestrictions
float GetHoldActionTime()
override UIScriptedMenu GetNoteMenu()
void SendMuteListToServer(map< string, bool > mute_list)
override void AddActiveInputExcludes(array< string > excludes)
Adds one or more exclude groups to disable and refreshes excludes.
int m_ControlDisabledMode
ref ActionMenu m_ActionMenu
override void OnUpdate(float timeslice)
override void OnInit()
override void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
Removes one or more exclude groups and refreshes excludes.
void SetActionUpTime(int time_up)
override map< int, ref WidgetFadeTimer > GetVoiceLevelTimers()
override void OnPlayerRespawned(Man player)
override void ShowInventory()
ref IngameHud m_Hud
override void PlayerControlDisable(int mode)
Deprecated; simple input restrictions.
void DestroyInventory()
override void Continue()
ref HudDebug m_HudDebug
override bool IsInputExcludeActive(string exclude)
Returns true if the particular input exclude group had been activated via script and is active.
override void StartLogoutMenu(int time)
bool m_PlayerRespawning
ImageWidget m_MicrophoneIcon
override bool IsControlDisabled()
returns if ANY exclude groups, restriction (or deprecated disable, if applicable) is active
override map< int, ImageWidget > GetVoiceLevelWidgets()
void DestroyAllMenus()
UIManager m_UIManager
override ImageWidget GetMicrophoneIcon()
ref map< int, ref WidgetFadeTimer > m_VoiceLevelTimers
override void SetNoteMenu(UIScriptedMenu menu)
void TickScheduler(float timeslice)
override void HideDebugMonitor()
override void ResetGUI()
override void ShowChat()
override void OnKeyRelease(int key)
void HandleMapToggleByKeyboardShortcut(Man player)
override void HideCrosshairVisibility()
override void RefreshCrosshairVisibility()
ref ScriptInvoker m_OnConnectivityChanged
override bool IsInputRestrictionActive(int restriction)
Returns true if the particular 'restriction' (those govern special behaviour outside regular input ex...
override void SetVoNActive(bool active)
ref DebugMonitor m_DebugMonitor
override bool IsMissionGameplay()
ref map< int, ImageWidget > m_VoiceLevelsWidgets
override void HideChat()
override void OnEvent(EventType eventTypeId, Param params)
void ShowHairDebugValues(bool state)
ref WidgetFadeTimer m_ChatChannelFadeTimer
override int GetControlDisabledMode()
(mostly)DEPRECATED; only set on the old 'PlayerControlDisable' method
override bool IsPlayerRespawning()
Widget m_VoiceLevels
override void AbortMission()
override Hud GetHud()
ref WidgetFadeTimer m_MicFadeTimer
void SetActionDownTime(int time_down)
override void HideVoiceLevelWidgets()
override bool IsVoNActive()
void MissionGameplay()
ref Timer m_ChatChannelHideTimer
InventoryMenu GetInventory()
override void OnKeyPress(int key)
TextWidget m_ChatChannelText
override void RefreshExcludes()
queues refresh of input excludes
ScriptInvoker GetConnectivityInvoker()
ref array< string > m_ActiveInputExcludeGroups
ref LogoutMenu m_Logout
Widget m_HudRootWidget
override int GetRespawnModeClient()
override void AddActiveInputRestriction(int restrictor)
Adds one input restriction (specific behaviour oudside regular excludes, defined below)
override void HideInventory()
override void Pause()
override void CreateLogoutMenu(UIMenuPanel parent)
override GameplayEffectWidgets GetEffectWidgets()
Widget m_ChatChannelArea
void MoveHudForInventory(bool inv_open)
void UpdateDebugMonitor()
override void OnMissionFinish()
bool m_ProcessInputExcludes
override void SetPlayerRespawning(bool state)
void PerformRefreshExcludes()
applies queued excludes (0 == clear excludes)
ref GameplayEffectWidgets m_EffectWidgets
override void RemoveActiveInputRestriction(int restrictor)
Removes one restriction (specific behaviour oudside regular excludes, defined below)
ref Chat m_Chat
override void OnMissionStart()
bool IsMapUnfoldActionRunning(ActionBase pAction)
override bool IsPaused()
void DisplayHairDebug()
ref Timer m_ToggleHudTimer
override void SetRespawnModeClient(int mode)
override WidgetFadeTimer GetMicWidgetFadeTimer()
override void UpdateVoiceLevelWidgets(int level)
NoteMenu m_Note
override void UpdateInputDevicesAvailability()
ref InventoryMenu m_InventoryMenu
override void OnItemUsed(InventoryItem item, Man owner)
override array< vector > GetActiveRefresherLocations()
Static component of PPE manager, used to hold the instance.
Definition PPEManager.c:3
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Definition PPEManager.c:27
Deprecated; 'PPEManager' used instead.
Definition PPEffects.c:3
static void Init()
Definition PPEffects.c:52
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
Manager class for managing Effect (EffectParticle, EffectSound)
static ref ScriptInvoker Event_OnFrameUpdate
Static invoker for the SEffectManager.Event_OnFrameUpdate called form MissionGameplay....
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116
static void RegisterEvents()
Definition SyncEvents.c:3
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
proto native bool IsDialogVisible()
proto native void ScreenFadeOut(float duration)
bool CloseMenu(int id)
Close menu with specific ID (see MenuID)
Definition UIManager.c:111
proto native UIScriptedMenu EnterScriptedMenu(int id, UIMenuPanel parent)
Create & open menu with specific id (see MenuID) and set its parent.
void ShowUICursor(bool visible)
Definition UIManager.c:234
UIScriptedMenu FindMenu(int id)
Returns menu with specific ID if it is open (see MenuID)
Definition UIManager.c:154
bool CloseAll()
Close all opened menus.
Definition UIManager.c:76
proto native void HideDialog()
proto native UIScriptedMenu ShowScriptedMenu(UIScriptedMenu menu, UIMenuPanel parent)
proto native void HideScriptedMenu(UIScriptedMenu menu)
Part of main menu hierarchy to create custom menus from script.
proto native UIScriptedMenu EnterScriptedMenu(int id)
Create & open menu with specific id (see MenuID) and set this menu as its parent.
static void SpawnAllTriggerCarriers()
Manager class which handles Voice-over-network functionality while player is connected to a server.
Definition VONManager.c:242
static VONManagerBase GetInstance()
Main way to access VONManager functionality from script.
Definition VONManager.c:249
static VicinityItemManager GetInstance()
const EventType SetFreeCameraEventTypeID
params: SetFreeCameraEventParams
Definition gameplay.c:550
const EventType ChatChannelEventTypeID
params: ChatChannelEventParams
Definition gameplay.c:486
proto native CGame GetGame()
const EventType ChatMessageEventTypeID
params: ChatMessageEventParams
Definition gameplay.c:484
static proto native void End()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
static proto void BeginCleanupScope()
static proto native void EndCleanupScope()
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.
static proto int GetValue(int id)
Get value as int from the given script id.
const int INPUT_EXCLUDE_MOUSE_RADIAL
Definition constants.c:608
const int INPUT_EXCLUDE_ALL
Definition constants.c:605
const int INPUT_EXCLUDE_INVENTORY
Definition constants.c:606
const int INPUT_EXCLUDE_MAP
Definition constants.c:609
const int INPUT_EXCLUDE_MOUSE_ALL
Definition constants.c:607
const int INPUT_DEVICE_MOUSE
Definition constants.c:24
const int INPUT_ACTION_TYPE_DOUBLETAP
Definition constants.c:40
const int INPUT_DEVICE_MOUSE_AXIS
Definition constants.c:42
const int INPUT_ACTION_TYPE_DOWN_EVENT
Definition constants.c:33
const int MENU_LOGOUT
Definition constants.c:185
const int MENU_INSPECT
Definition constants.c:169
const int MENU_MAP
Definition constants.c:181
const int MENU_RESPAWN_DIALOGUE
Definition constants.c:199
const int MENU_GESTURES
Definition constants.c:184
const int MENU_CHAT
Definition constants.c:165
const int MENU_INVENTORY
Definition constants.c:170
const int MENU_NOTE
Definition constants.c:180
const int MENU_RADIAL_QUICKBAR
Definition constants.c:188
const int MENU_BOOK
Definition constants.c:182
const int MENU_INGAME
Definition constants.c:168
const int MENU_CHAT_INPUT
Definition constants.c:176
proto native bool IsCLIParam(string param)
Returns if command line argument is present.
const int CALL_CATEGORY_GUI
Definition tools.c:9
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8
const int IDC_MAIN_QUIT
Definition constants.c:136