DayZ 1.24
Loading...
Searching...
No Matches
MissionBaseWorld Class Reference
Collaboration diagram for MissionBaseWorld:
[legend]

Private Member Functions

void MissionBase ()
 
void ~MissionBase ()
 
override ObjectSnapCallback GetInventoryDropCallback ()
 
void InitialiseWorldData ()
 
override WorldLighting GetWorldLighting ()
 
override WorldData GetWorldData ()
 
override UIScriptedMenu CreateScriptedMenu (int id)
 
void SpawnItems ()
 
void UpdateInputDevicesAvailability ()
 
override void OnKeyPress (int key)
 
void DumpCurrentUILayout ()
 
void DumpWidget (Widget w, int tabs)
 
override void OnKeyRelease (int key)
 
override void OnMouseButtonPress (int button)
 
override void OnMouseButtonRelease (int button)
 
void OnLog (string msg_log)
 
void UpdateDummyScheduler ()
 
override void AddDummyPlayerToScheduler (Man player)
 

Private Attributes

PluginDeveloper m_ModuleDeveloper
 
PluginKeyBinding m_ModuleKeyBinding PluginAdditionalInfo m_ModuleServerInfo
 
ref WidgetEventHandler m_WidgetEventHandler
 
ref WorldData m_WorldData
 
ref WorldLighting m_WorldLighting
 
ref array< PlayerBasem_DummyPlayers = new array<PlayerBase>
 
autoptr ObjectSnapCallback m_InventoryDropCallback
 
int m_WidgetsTotal
 
int m_WidgetsInvisible
 

Detailed Description

Definition at line 1 of file missionBase.c.

Constructor & Destructor Documentation

◆ ~MissionBase()

void MissionBaseWorld::~MissionBase ( )
inlineprivate

Definition at line 48 of file missionBase.c.

49 {
51
52 if (GetGame().IsClient())
53 GetDayZGame().GetAnalyticsClient().UnregisterEvents();
55 }
DayZGame GetDayZGame()
Definition DayZGame.c:3530
void PluginManagerDelete()
proto native CGame GetGame()

References TriggerEffectManager::DestroyInstance(), GetDayZGame(), GetGame(), and PluginManagerDelete().

Member Function Documentation

◆ AddDummyPlayerToScheduler()

override void MissionBaseWorld::AddDummyPlayerToScheduler ( Man player)
inlineprivate

Definition at line 376 of file missionBase.c.

377 {
378 m_DummyPlayers.Insert(PlayerBase.Cast(player));
379 }
ref array< PlayerBase > m_DummyPlayers
Definition missionBase.c:11

◆ CreateScriptedMenu()

override UIScriptedMenu MissionBaseWorld::CreateScriptedMenu ( int id)
inlineprivate

Definition at line 100 of file missionBase.c.

101 {
103
104 switch (id)
105 {
106 case MENU_MAIN:
107#ifdef PLATFORM_CONSOLE
108 menu = new MainMenuConsole;
109#else
110 menu = new MainMenu;
111#endif
112 break;
113 case MENU_INGAME:
114#ifdef PLATFORM_CONSOLE
115 menu = new InGameMenuXbox;
116#else
117 menu = new InGameMenu;
118#endif
119 break;
120 case MENU_CHARACTER:
121 menu = new CharacterCreationMenu;
122 break;
123 case MENU_OPTIONS:
124 menu = new OptionsMenu;
125 break;
126 case MENU_STARTUP:
127 menu = new StartupMenu;
128 break;
129 case MENU_LOADING:
130 menu = new LoadingMenu;
131 break;
132 case MENU_INVENTORY:
133 menu = new InventoryMenu;
134 break;
135 case MENU_INSPECT:
136 menu = new InspectMenuNew;
137 break;
138 case MENU_EARLYACCESS:
139 menu = new EarlyAccessMenu;
140 break;
142 menu = new ScriptConsole;
143 break;
145 menu = new ScriptConsoleNewPresetDialog;
146 break;
148 menu = new ScriptConsoleRenamePresetDialog;
149 break;
151 menu = new ScriptConsoleUniversalInfoDialog;
152 break;
153 case MENU_CHAT_INPUT:
154 menu = new ChatInputMenu;
155 break;
157 menu = new PresetsMenu;
158 break;
159 case MENU_NOTE:
160 menu = new NoteMenu;
161 break;
162 case MENU_MAP:
163 menu = new MapMenu;
164 break;
165 case MENU_BOOK:
166 menu = new BookMenu;
167 break;
169 menu = new SceneEditorMenu;
170 break;
171 case MENU_HELP_SCREEN:
172 menu = new HelpScreen;
173 break;
174 case MENU_GESTURES:
175 menu = new GesturesMenu;
176 break;
177 case MENU_LOGOUT:
178 menu = new LogoutMenu;
179 break;
181 menu = new TitleScreenMenu;
182 break;
184 menu = new ControlsXboxNew;
185 break;
187 menu = new RadialQuickbarMenu;
188 break;
191 break;
192 case MENU_LOGIN_QUEUE:
193 menu = new LoginQueueBase;
194 break;
195 case MENU_LOGIN_TIME:
196 menu = new LoginTimeBase;
197 break;
199 menu = new CameraToolsMenu;
200 break;
201 case MENU_VIDEO:
202 menu = new MainMenuVideo;
203 break;
204 case MENU_KEYBINDINGS:
205 menu = new KeybindingsMenu;
206 break;
207 case MENU_TUTORIAL:
208 menu = new TutorialsMenu;
209 break;
210 case MENU_CREDITS:
211 menu = new CreditsMenu;
212 break;
214 menu = new InviteMenu;
215 break;
218 break;
220 menu = new InputDeviceDisconnectWarningMenu;
221 break;
224 break;
226 menu = new RespawnDialogue;
227 break;
230 break;
231 case MENU_LOC_ADD:
232 menu = new ScriptConsoleAddLocation;
233 break;
235 menu = new MissionLoader;
236 break;
237 }
238
239 if (menu)
240 menu.SetID(id);
241
242 return menu;
243 }
void LoginQueueBase()
Definition DayZGame.c:110
void InventoryMenu()
LoginTime when using -connect since mission is not created yet.
Definition DayZGame.c:320
const int MENU_CONNECT_ERROR
Definition constants.c:201
const int MENU_TUTORIAL
Definition constants.c:194
const int MENU_HELP_SCREEN
Definition constants.c:183
const int MENU_TITLE_SCREEN
Definition constants.c:186
const int MENU_KEYBINDINGS
Definition constants.c:193
const int MENU_XBOX_CONTROLS
Definition constants.c:187
const int MENU_SCRIPTCONSOLE
Definition constants.c:175
const int MENU_WARNING_TELEPORT
Definition constants.c:200
const int MENU_LOGOUT
Definition constants.c:185
const int MENU_INSPECT
Definition constants.c:169
const int MENU_LOGIN_TIME
Definition constants.c:197
const int MENU_MAP
Definition constants.c:181
const int MENU_MAIN
Definition constants.c:172
const int MENU_SERVER_BROWSER
Definition constants.c:190
const int MENU_WARNING_ITEMDROP
Definition constants.c:198
const int MENU_MISSION_LOADER
Definition constants.c:204
const int MENU_SCRIPTCONSOLE_UNIVERSAL_INFO_DIALOG
Definition constants.c:203
const int MENU_STARTUP
Definition constants.c:174
const int MENU_RESPAWN_DIALOGUE
Definition constants.c:199
const int MENU_OPTIONS
Definition constants.c:173
const int MENU_CREDITS
Definition constants.c:195
const int MENU_CAMERA_TOOLS
Definition constants.c:191
const int MENU_CHARACTER
Definition constants.c:164
const int MENU_INVITE_TIMER
Definition constants.c:196
const int MENU_GESTURES
Definition constants.c:184
const int MENU_LOGIN_QUEUE
Definition constants.c:189
const int MENU_SCENE_EDITOR
Definition constants.c:167
const int MENU_SCRIPTCONSOLE_DIALOG_PRESET_NAME
Definition constants.c:177
const int MENU_WARNING_INPUTDEVICE_DISCONNECT
Definition constants.c:202
const int MENU_CONTROLS_PRESET
Definition constants.c:179
const int MENU_EARLYACCESS
Definition constants.c:166
const int MENU_SCRIPTCONSOLE_DIALOG_PRESET_RENAME
Definition constants.c:178
const int MENU_INVENTORY
Definition constants.c:170
const int MENU_NOTE
Definition constants.c:180
const int MENU_LOADING
Definition constants.c:171
const int MENU_RADIAL_QUICKBAR
Definition constants.c:188
const int MENU_BOOK
Definition constants.c:182
const int MENU_LOC_ADD
Definition constants.c:162
const int MENU_INGAME
Definition constants.c:168
const int MENU_CHAT_INPUT
Definition constants.c:176
const int MENU_VIDEO
Definition constants.c:192

References InventoryMenu(), LoginQueueBase(), MENU_BOOK, MENU_CAMERA_TOOLS, MENU_CHARACTER, MENU_CHAT_INPUT, MENU_CONNECT_ERROR, MENU_CONTROLS_PRESET, MENU_CREDITS, MENU_EARLYACCESS, MENU_GESTURES, MENU_HELP_SCREEN, MENU_INGAME, MENU_INSPECT, MENU_INVENTORY, MENU_INVITE_TIMER, MENU_KEYBINDINGS, MENU_LOADING, MENU_LOC_ADD, MENU_LOGIN_QUEUE, MENU_LOGIN_TIME, MENU_LOGOUT, MENU_MAIN, MENU_MAP, MENU_MISSION_LOADER, MENU_NOTE, MENU_OPTIONS, MENU_RADIAL_QUICKBAR, MENU_RESPAWN_DIALOGUE, MENU_SCENE_EDITOR, MENU_SCRIPTCONSOLE, MENU_SCRIPTCONSOLE_DIALOG_PRESET_NAME, MENU_SCRIPTCONSOLE_DIALOG_PRESET_RENAME, MENU_SCRIPTCONSOLE_UNIVERSAL_INFO_DIALOG, MENU_SERVER_BROWSER, MENU_STARTUP, MENU_TITLE_SCREEN, MENU_TUTORIAL, MENU_VIDEO, MENU_WARNING_INPUTDEVICE_DISCONNECT, MENU_WARNING_ITEMDROP, MENU_WARNING_TELEPORT, and MENU_XBOX_CONTROLS.

◆ DumpCurrentUILayout()

void MissionBaseWorld::DumpCurrentUILayout ( )
inlineprivate

Definition at line 265 of file missionBase.c.

266 {
267 UIScriptedMenu current_menu = GetGame().GetUIManager().GetMenu();
268
269 if (current_menu)
270 {
271 Widget widget_root = current_menu.GetLayoutRoot();
272
273 if (widget_root)
274 {
275 m_WidgetsTotal = 0;
277
278 Print(widget_root.GetName() + " (" + widget_root.GetTypeName() + ")");
279
280 DumpWidget(widget_root.GetChildren(), 1);
281
282 Print("Widgets TOTAL: " + m_WidgetsTotal.ToString() + " INVISIBLE: " + m_WidgetsInvisible.ToString() + " VISIBLE: " + (m_WidgetsTotal - m_WidgetsInvisible).ToString());
283 }
284 }
285 }
void DumpWidget(Widget w, int tabs)
proto void Print(void var)
Prints content of variable to console/log.

References GetGame(), and Print().

◆ DumpWidget()

void MissionBaseWorld::DumpWidget ( Widget w,
int tabs )
inlineprivate

Definition at line 287 of file missionBase.c.

288 {
289 if (!w)
290 return;
291
293
294 string tmp;
295 for (int i = 0; i < tabs; i++)
296 tmp += " ";
297
298 string invisible = "";
299
300 if (!w.IsVisibleHierarchy())
301 {
302 invisible = "[invisible]";
304 }
305
306 Print(tmp + "- " + w.GetName() + " (" + w.GetTypeName() + ") " + invisible);
307
308 bool collapse = false;
309 if (w.GetChildren())
310 {
311 collapse = true;
312 Print(tmp + "{");
313 }
314
315 DumpWidget(w.GetChildren(), tabs + 1);
316
317 if (collapse)
318 Print(tmp + "}");
319
320 DumpWidget(w.GetSibling(), tabs);
321 }

References Print().

◆ GetInventoryDropCallback()

override ObjectSnapCallback MissionBaseWorld::GetInventoryDropCallback ( )
inlineprivate

Definition at line 57 of file missionBase.c.

58 {
60 }
autoptr ObjectSnapCallback m_InventoryDropCallback
Definition missionBase.c:13

◆ GetWorldData()

override WorldData MissionBaseWorld::GetWorldData ( )
inlineprivate

Definition at line 95 of file missionBase.c.

96 {
97 return m_WorldData;
98 }
ref WorldData m_WorldData
Definition missionBase.c:8

◆ GetWorldLighting()

override WorldLighting MissionBaseWorld::GetWorldLighting ( )
inlineprivate

Definition at line 90 of file missionBase.c.

91 {
92 return m_WorldLighting;
93 }
ref WorldLighting m_WorldLighting
Definition missionBase.c:9

◆ InitialiseWorldData()

void MissionBaseWorld::InitialiseWorldData ( )
inlineprivate

Definition at line 62 of file missionBase.c.

63 {
64 string worldName = "empty";
65 GetGame().GetWorldName(worldName);
66 worldName.ToLower();
67
68 switch (worldName)
69 {
70 case "chernarusplus":
72 break;
73
74 case "enoch":
75 m_WorldData = new EnochData();
76 break;
77
78#ifdef PLATFORM_CONSOLE
79 case "mainmenuscenexbox":
81 break
82#endif
83
84 default:
86 break;
87 }
88 }

References GetGame().

◆ MissionBase()

void MissionBaseWorld::MissionBase ( )
inlineprivate

Definition at line 15 of file missionBase.c.

16 {
18
20
22
24
25 //Debug.DestroyAllShapes();
26
27 //TODO clea up after Gamescom
29 //
31
32 if (GetGame().IsServer())
34 else
35 {
36 GetDayZGame().GetAnalyticsClient().RegisterEvents();
38 }
39
40 GetOnInputDeviceConnected().Insert(UpdateInputDevicesAvailability);
41 GetOnInputDeviceDisconnected().Insert(UpdateInputDevicesAvailability);
42
43 // There is a possibility different maps/servers may be using different effects
45 GetUApi().UpdateControls();
46 }
void SetDispatcher(Dispatcher dispatcher)
Definition Dispatcher.c:31
PluginBase GetPlugin(typename plugin_type)
void PluginManagerInit()
proto native UAInputAPI GetUApi()
ref WidgetEventHandler m_WidgetEventHandler
Definition missionBase.c:7
void UpdateInputDevicesAvailability()
PluginKeyBinding m_ModuleKeyBinding PluginAdditionalInfo m_ModuleServerInfo
Definition missionBase.c:5
void InitialiseWorldData()
Definition missionBase.c:62
Manager class for managing Effect (EffectParticle, EffectSound)
static void Cleanup()
Cleanup method to properly clean up the static data.
static void Init()
Definition SoundSetMap.c:6

References SEffectManager::Cleanup(), GetDayZGame(), GetGame(), GetPlugin(), GetUApi(), SoundSetMap::Init(), MissionBase::IsServer(), PluginManagerInit(), SetDispatcher(), and MissionBase::UpdateInputDevicesAvailability().

◆ OnKeyPress()

override void MissionBaseWorld::OnKeyPress ( int key)
inlineprivate

Definition at line 252 of file missionBase.c.

253 {
254 super.OnKeyPress(key);
255
256#ifdef DIAG_DEVELOPER
257 if (PluginKeyBinding.instance)
258 PluginKeyBinding.instance.OnKeyPress(key);
259#endif
260 }

◆ OnKeyRelease()

override void MissionBaseWorld::OnKeyRelease ( int key)
inlineprivate

Definition at line 323 of file missionBase.c.

324 {
325 super.OnKeyRelease(key);
326
327 if (GetGame().IsDebug())
328 {
329 if (PluginKeyBinding.instance != NULL)
330 PluginKeyBinding.instance.OnKeyRelease(key);
331 }
332 }

References GetGame().

◆ OnLog()

void MissionBaseWorld::OnLog ( string msg_log)
inlineprivate

Definition at line 356 of file missionBase.c.

357 {
358 if (PluginDeveloper.GetInstance())
359 {
360 if (GetGame().IsServer() && !GetGame().IsMultiplayer())
361 PluginDeveloper.GetInstance().PrintLogClient(msg_log);
362 else if (GetGame().IsMultiplayer() && GetGame().IsClient())
363 PluginDeveloper.GetInstance().PrintLogClient(msg_log);
364 }
365 }

References GetGame(), and MissionBase::IsServer().

◆ OnMouseButtonPress()

override void MissionBaseWorld::OnMouseButtonPress ( int button)
inlineprivate

Definition at line 334 of file missionBase.c.

335 {
336 super.OnMouseButtonPress(button);
337
338 if (GetGame().IsDebug())
339 {
340 if (PluginKeyBinding.instance != NULL)
341 PluginKeyBinding.instance.OnMouseButtonPress(button);
342 }
343 }

References GetGame().

◆ OnMouseButtonRelease()

override void MissionBaseWorld::OnMouseButtonRelease ( int button)
inlineprivate

Definition at line 345 of file missionBase.c.

346 {
347 super.OnMouseButtonRelease(button);
348
349 if (GetGame().IsDebug())
350 {
351 if (PluginKeyBinding.instance != NULL)
352 PluginKeyBinding.instance.OnMouseButtonRelease(button);
353 }
354 }

References GetGame().

◆ SpawnItems()

void MissionBaseWorld::SpawnItems ( )
private

◆ UpdateDummyScheduler()

void MissionBaseWorld::UpdateDummyScheduler ( )
inlineprivate

Definition at line 367 of file missionBase.c.

368 {
369 for (int i = 0; i < m_DummyPlayers.Count(); i++)
370 {
371 if (m_DummyPlayers.Get(i))
372 m_DummyPlayers.Get(i).OnTick();
373 }
374 }

◆ UpdateInputDevicesAvailability()

void MissionBaseWorld::UpdateInputDevicesAvailability ( )
inlineprivate

Definition at line 247 of file missionBase.c.

248 {
249 g_Game.RefreshMouseCursorVisibility();
250 }
DayZGame g_Game
Definition DayZGame.c:3528

References g_Game.

Member Data Documentation

◆ m_DummyPlayers

ref array<PlayerBase> MissionBaseWorld::m_DummyPlayers = new array<PlayerBase>
private

Definition at line 11 of file missionBase.c.

◆ m_InventoryDropCallback

autoptr ObjectSnapCallback MissionBaseWorld::m_InventoryDropCallback
private

Definition at line 13 of file missionBase.c.

◆ m_ModuleDeveloper

PluginDeveloper MissionBaseWorld::m_ModuleDeveloper
private

Definition at line 3 of file missionBase.c.

◆ m_ModuleServerInfo

PluginKeyBinding m_ModuleKeyBinding PluginAdditionalInfo MissionBaseWorld::m_ModuleServerInfo
private

Definition at line 5 of file missionBase.c.

◆ m_WidgetEventHandler

ref WidgetEventHandler MissionBaseWorld::m_WidgetEventHandler
private

Definition at line 7 of file missionBase.c.

◆ m_WidgetsInvisible

int MissionBaseWorld::m_WidgetsInvisible
private

Definition at line 263 of file missionBase.c.

◆ m_WidgetsTotal

int MissionBaseWorld::m_WidgetsTotal
private

Definition at line 262 of file missionBase.c.

◆ m_WorldData

ref WorldData MissionBaseWorld::m_WorldData
private

Definition at line 8 of file missionBase.c.

◆ m_WorldLighting

ref WorldLighting MissionBaseWorld::m_WorldLighting
private

Definition at line 9 of file missionBase.c.


The documentation for this class was generated from the following file: