LeviLamina
Loading...
Searching...
No Matches
WorldSettingsScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/ViewRequest.h"
8#include "mc/client/gui/screens/controllers/ModalScreenButtonId.h"
9#include "mc/client/gui/screens/controllers/SettingsScreenControllerBase.h"
10#include "mc/client/gui/screens/controllers/SettingsScreenMode.h"
11#include "mc/client/gui/screens/controllers/WorldMultiplayerLockState.h"
12#include "mc/client/gui/screens/interfaces/IWorldSettingsStorage.h"
13#include "mc/client/gui/screens/rules/WorldSettingsRules.h"
14#include "mc/client/network/realms/World.h"
15#include "mc/client/world/PostCreateWorldAction.h"
16#include "mc/deps/cereal/schema/dynamic/NullType.h"
17#include "mc/deps/core/file/PathBuffer.h"
18#include "mc/deps/core/threading/Async.h"
19#include "mc/deps/core/utility/NonOwnerPointer.h"
20#include "mc/platform/Result.h"
21#include "mc/server/commands/PlayerPermissionLevel.h"
22#include "mc/world/level/FileArchiver.h"
23#include "mc/world/level/LevelListCacheObserver.h"
24#include "mc/world/level/NetherWorldType.h"
25#include "mc/world/level/SpawnSettings.h"
26#include "mc/world/level/storage/ExperimentStorage.h"
27#include "mc/world/level/storage/LevelDataWrapper.h"
28#include "mc/world/level/storage/LevelSummary.h"
29#include "mc/world/level/storage/edu_cloud/WorldSyncState.h"
30
31// auto generated forward declare list
32// clang-format off
33class DlcUIWrapper;
34class IContentManager;
36class LevelData;
40struct GameRuleId;
42namespace Core { class FileStorageArea; }
43namespace EduCloud { struct IEduCloudSaveSystem; }
44namespace Json { class Value; }
45namespace MSGraph::Models { struct DriveItem; }
46namespace MSGraph::Models { struct GraphError; }
47// clang-format on
48
52public:
53 // WorldSettingsScreenController inner types define
54 using GameRuleValueMapping = ::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>;
55
56 using GameRuleValueMappingList =
57 ::std::vector<::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>>;
58
59public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<4, 4, ::SettingsScreenMode> mSettingsMode;
63 ::ll::TypedStorage<8, 32, ::std::string> mSeedString;
64 ::ll::TypedStorage<8, 32, ::std::string> mRandomTickSpeedString;
65 ::ll::TypedStorage<8, 32, ::std::string> mRespawnRadiusString;
66 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mWorldImagePath;
67 ::ll::TypedStorage<8, 848, ::LevelSummary> mEditedLevel;
68 ::ll::TypedStorage<8, 1704, ::LevelDataWrapper> mLevelData;
69 ::ll::TypedStorage<8, 72, ::ExperimentStorage> mOriginalExperiments;
70 ::ll::TypedStorage<4, 4, ::EduCloud::WorldSyncState const> mEditedLevelSyncState;
71 ::ll::TypedStorage<1, 1, bool> mEditedLevelDeleted;
72 ::ll::TypedStorage<8, 112, ::WorldSettingsRules> mWorldSettingsRules;
73 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
74 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
75 ::ll::TypedStorage<8, 16, ::WorldMultiplayerLockState> mMultiplayerState;
76 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlatformMultiplayerRestrictions>> mPlatformMultiplayerRestrictions;
77 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mWorldContentSource;
78 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::EduCloud::IEduCloudSaveSystem>> mEduCloudSaveSystem;
79 ::ll::TypedStorage<1, 1, bool> mLocalCheatsAllowed;
80 ::ll::TypedStorage<4, 4, int> mLocalGameType;
81 ::ll::TypedStorage<4, 4, int> mGameDifficulty;
82 ::ll::TypedStorage<1, 1, ::NetherWorldType> mNetherType;
83 ::ll::TypedStorage<8, 48, ::SpawnSettings> mSpawnSettings;
84 ::ll::TypedStorage<1, 1, bool> mGameVersionOverrideEnabled;
85 ::ll::TypedStorage<8, 32, ::std::string> mGameVersionOverride;
86 ::ll::TypedStorage<8, 32, ::std::string> mInitialPackId;
87 ::ll::TypedStorage<1, 1, bool> mRefreshLevelData;
88 ::ll::TypedStorage<1, 1, bool> mAttemptedToCreateNewWorld;
89 ::ll::TypedStorage<1, 1, bool> mHackStatusVariableToTrackWorldCreationUntilWeFixInputBufferingOnUIStack;
90 ::ll::TypedStorage<8, 656, ::Realms::World> mRealmWorld;
91 ::ll::TypedStorage<8, 24, ::std::vector<int>> mServerSimDistanceOptionValues;
92 ::ll::TypedStorage<8, 24, ::std::vector<int>> mSleepPercentOptionValues;
93 ::ll::TypedStorage<1, 1, bool> mHasRealms;
94 ::ll::TypedStorage<1, 1, bool> mSleepEnabled;
95 ::ll::TypedStorage<
96 8,
97 24,
98 ::std::vector<::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>>>
99 mOriginalGameRuleValueCache;
100 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IContentManagerContext>> mContentManagerContext;
101 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WorldSettingsScreenControllerProxy>> mProxy;
102 ::ll::TypedStorage<8, 64, ::std::function<void()>> mOnOpenCallback;
103 ::ll::TypedStorage<
104 8,
105 16,
106 ::Bedrock::Threading::Async<::Bedrock::Result<::MSGraph::Models::DriveItem, ::MSGraph::Models::GraphError>>>
107 mGetCloudItemByIdHandle;
108 ::ll::TypedStorage<8, 32, ::std::string> mCloudFileName;
109 ::ll::TypedStorage<8, 32, ::std::string> mCloudLastChanged;
110 ::ll::TypedStorage<1, 1, bool> mCanEditGameModeInEdu;
111 ::ll::TypedStorage<1, 1, bool> mUnhideServerSettings;
112 // NOLINTEND
113
114public:
115 // prevent constructor by default
116 WorldSettingsScreenController& operator=(WorldSettingsScreenController const&);
117 WorldSettingsScreenController(WorldSettingsScreenController const&);
118 WorldSettingsScreenController();
119
120public:
121 // virtual functions
122 // NOLINTBEGIN
123 virtual ~WorldSettingsScreenController() /*override*/;
124
125 virtual void onCreation() /*override*/;
126
127 virtual void onOpen() /*override*/;
128
129 virtual void onTerminate() /*override*/;
130
131 virtual void onLevelDeleted(::std::string const& levelId) /*override*/;
132
133 virtual void onStorageChanged() /*override*/;
134
135 virtual ::ui::DirtyFlag tick() /*override*/;
136
137 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
138
139 virtual bool hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea) /*override*/;
140
141 virtual void saveWorld() /*override*/;
142
143 virtual ::LevelSummary& getLevelSummary() /*override*/;
144
145 virtual ::LevelData& getLevelData() /*override*/;
146
147 virtual void _registerControllerCallbacks();
148
149 virtual void _displayLockedWorldPopup() /*override*/;
150 // NOLINTEND
151
152public:
153 // member functions
154 // NOLINTBEGIN
155 MCAPI WorldSettingsScreenController(
156 ::std::shared_ptr<::MainMenuScreenModel> model,
157 bool createWorld,
158 bool unhideServerSettings
159 );
160
161 MCAPI WorldSettingsScreenController(
162 ::std::shared_ptr<::MainMenuScreenModel> model,
163 ::LevelSummary const& levelSummary,
164 bool createFromTemplate,
165 ::std::function<void()> onOpenCallback,
166 ::std::string initialPackId,
167 bool unhideServerSettings
168 );
169
170 MCAPI void _cacheGameRuleValues();
171
172 MCAPI void _calculateSleepPercentageOptions();
173
174 MCAPI bool _canBroadcastOnXBL() const;
175
176 MCAPI bool _canChangeWorldOption() const;
177
178 MCAPI bool _canEditDifficulty();
179
180 MCAPI void _confirmationUnlockTemplatedWorldOptionsDialog();
181
182 MCAPI void _copyAndSetDataHelper(::std::function<void(::LevelData&)> setDataCallback);
183
184 MCAPI ::ui::ViewRequest _copyWorld(::std::function<void(::LevelData&)> setDataCallback, bool leaveScreen);
185
186 MCAPI ::ui::ViewRequest _createWorld(::PostCreateWorldAction postCreateWorldAction);
187
188 MCAPI void _createWorldOnRealms();
189
190 MCAPI ::ui::ViewRequest _exportWorld(::FileArchiver::ExportType type);
191
192 MCAPI void _fireCachedGameRuleTelemetryEventsOnExit();
193
194 MCAPI int _getDifficulty();
195
196 MCAPI bool _getMultiplayerEnabled() const;
197
198 MCAPI ::std::string _getPlatformMultiplayerWarningText() const;
199
200 MCAPI ::std::string _getWorldName();
201
202 MCAPI ::std::string _getXBLMultiplayerWarningText() const;
203
204 MCAPI void _init();
205
206 MCAPI bool _isAlwaysDayEnabled();
207
208 MCAPI bool _isEducationToggleEnabled();
209
210 MCAPI bool _isGameRuleEnabled() const;
211
212 MCAPI bool _isPlayerGameModeEnabled();
213
214 MCAPI bool _isServerVisibilityEnabled() const;
215
216 MCAPI bool _isWorldGameModeEnabled();
217
218 MCAPI bool _isWorldSeedEnabled();
219
220 MCAPI void _limitSpawnRadiusAgainstWorldType();
221
222 MCAPI ::ui::ViewRequest _makeWorldInfinite();
223
224 MCAPI bool _passedLockedContentCheck();
225
226 MCAPI void _playWorldOnRealms();
227
228 MCAPI void _registerWorldsClipboardSubController();
229
230 MCAPI ::ui::ViewRequest _resetRandomTickSpeed();
231
232 MCAPI void _selectRealm(::std::function<void(::Realms::World)> callback);
233
234 MCAPI void _setAllowCheats(bool value);
235
236 MCAPI void _setAllowCheatsHelper(bool value);
237
238 MCAPI void _setAlwaysDay(bool value);
239
240 MCAPI void _setDefaultPermissionLevel(::PlayerPermissionLevel newPermission);
241
242 MCAPI void _setDefaultPermissionLevelHelper(::PlayerPermissionLevel value);
243
244 MCAPI void _setDifficulty(int value);
245
246 MCAPI void _setEducationFeaturesEnabled(bool value);
247
248 MCAPI void _setExperimentalToggleHelper(bool value, int experimentIndex);
249
250 MCAPI void _setGameRule(int value, ::GameRuleId gameRuleId, bool suppressOuput);
251
252 MCAPI void _setGameRule(bool value, ::GameRuleId gameRuleId, bool suppressOuput);
253
254 MCAPI void _setHasUserRealms();
255
256 MCAPI void _setImmutableWorld(bool value);
257
258 MCAPI void _setLevelEditorWorldFlag();
259
260 MCAPI void _setMultiplayerEnabled(bool value);
261
262 MCAPI void _setNEXVisible(bool value);
263
264 MCAPI void _setPSNVisible(bool value);
265
266 MCAPI void _setPerfectWeather(bool value);
267
268 MCAPI void _setPlayerGameMode(int value);
269
270 MCAPI void _setServerVisible(bool value);
271
272 MCAPI void _setWorldGameMode(int value);
273
274 MCAPI void _setWorldGameModeHelper(int value);
275
276 MCAPI void _setWorldName(::std::string value);
277
278 MCAPI void _setWorldType(int value);
279
280 MCAPI void _setWorldTypeHelper(int value);
281
282 MCAPI void _setupCloudBindings();
283
284 MCAPI void _showConfirmationNoCrossPlatformPlaySkinPopup();
285
286 MCAPI ::ui::ViewRequest _startEducationWorld(bool shouldHost);
287
288 MCAPI void confirmationExperimentalGameplayDialog(
289 ::std::string const& messageId,
290 ::std::function<void(::ModalScreenButtonId)> callback
291 );
292
293 MCAPI ::WorldSettingsScreenControllerProxy* getWorldSettingsScreenControllerProxy();
294 // NOLINTEND
295
296public:
297 // static functions
298 // NOLINTBEGIN
299 MCAPI static void addStaticScreenVars(::Json::Value& globalVars, bool exportDisabled, bool isMultiplayerClient);
300 // NOLINTEND
301
302public:
303 // constructor thunks
304 // NOLINTBEGIN
305 MCAPI void* $ctor(::std::shared_ptr<::MainMenuScreenModel> model, bool createWorld, bool unhideServerSettings);
306
307 MCAPI void* $ctor(
308 ::std::shared_ptr<::MainMenuScreenModel> model,
309 ::LevelSummary const& levelSummary,
310 bool createFromTemplate,
311 ::std::function<void()> onOpenCallback,
312 ::std::string initialPackId,
313 bool unhideServerSettings
314 );
315 // NOLINTEND
316
317public:
318 // destructor thunk
319 // NOLINTBEGIN
320 MCAPI void $dtor();
321 // NOLINTEND
322
323public:
324 // virtual function thunks
325 // NOLINTBEGIN
326 MCAPI void $onCreation();
327
328 MCAPI void $onOpen();
329
330 MCAPI void $onTerminate();
331
332 MCAPI void $onLevelDeleted(::std::string const& levelId);
333
334 MCAPI void $onStorageChanged();
335
336 MCAPI ::ui::DirtyFlag $tick();
337
338 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
339
340 MCAPI bool $hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea);
341
342 MCAPI void $saveWorld();
343
344 MCFOLD ::LevelSummary& $getLevelSummary();
345
346 MCAPI ::LevelData& $getLevelData();
347
348 MCAPI void $_registerControllerCallbacks();
349
350 MCAPI void $_displayLockedWorldPopup();
351 // NOLINTEND
352
353public:
354 // vftables
355 // NOLINTBEGIN
356 MCNAPI static void** $vftableForScreenController();
357
359
360 MCNAPI static void** $vftableForLevelListCacheObserver();
361
362 MCNAPI static void** $vftableForIWorldSettingsStorage();
363 // NOLINTEND
364};
Definition FileStorageArea.h:31
Definition DlcUIWrapper.h:5
Definition IContentManagerContext.h:5
Definition IContentManager.h:5
Definition IWorldSettingsStorage.h:5
Definition Value.h:16
Definition LevelData.h:55
Definition LevelListCacheObserver.h:13
Definition MainMenuScreenModel.h:5
Definition PlatformMultiplayerRestrictions.h:5
Definition SettingsScreenControllerBase.h:5
Definition WorldSettingsScreenControllerProxy.h:5
Definition WorldSettingsScreenController.h:5
static MCAPI void ** $vftableForIWorldSettingsStorage()
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForLevelListCacheObserver()
Definition IEduCloudSaveSystem.h:7
Definition GameRuleId.h:8
Definition DriveItem.h:7
Definition GraphError.h:7
Definition PackManagerContentSource.h:5