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/LevelListCacheObserver.h"
23#include "mc/world/level/NetherWorldType.h"
24#include "mc/world/level/SpawnSettings.h"
25#include "mc/world/level/storage/ExperimentStorage.h"
26#include "mc/world/level/storage/LevelDataWrapper.h"
27#include "mc/world/level/storage/LevelSummary.h"
28#include "mc/world/level/storage/edu_cloud/WorldSyncState.h"
29
30// auto generated forward declare list
31// clang-format off
32class DlcUIWrapper;
33class IContentManager;
35class LevelData;
39struct GameRuleId;
41namespace Core { class FileStorageArea; }
42namespace EduCloud { struct IEduCloudSaveSystem; }
43namespace Json { class Value; }
44namespace MSGraph::Models { struct DriveItem; }
45namespace MSGraph::Models { struct GraphError; }
46// clang-format on
47
51public:
52 // WorldSettingsScreenController inner types define
53 using GameRuleValueMapping = ::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>;
54
55 using GameRuleValueMappingList =
56 ::std::vector<::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>>;
57
58public:
59 // member variables
60 // NOLINTBEGIN
61 ::ll::TypedStorage<4, 4, ::SettingsScreenMode> mSettingsMode;
62 ::ll::TypedStorage<8, 32, ::std::string> mSeedString;
63 ::ll::TypedStorage<8, 32, ::std::string> mRandomTickSpeedString;
64 ::ll::TypedStorage<8, 32, ::std::string> mRespawnRadiusString;
65 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mWorldImagePath;
66 ::ll::TypedStorage<8, 848, ::LevelSummary> mEditedLevel;
67 ::ll::TypedStorage<8, 1704, ::LevelDataWrapper> mLevelData;
68 ::ll::TypedStorage<8, 72, ::ExperimentStorage> mOriginalExperiments;
69 ::ll::TypedStorage<4, 4, ::EduCloud::WorldSyncState const> mEditedLevelSyncState;
70 ::ll::TypedStorage<1, 1, bool> mEditedLevelDeleted;
71 ::ll::TypedStorage<8, 112, ::WorldSettingsRules> mWorldSettingsRules;
72 ::ll::TypedStorage<8, 8, ::IContentManager&> mContentManager;
73 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DlcUIWrapper>> mDlcUIWrapper;
74 ::ll::TypedStorage<8, 16, ::WorldMultiplayerLockState> mMultiplayerState;
75 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlatformMultiplayerRestrictions>> mPlatformMultiplayerRestrictions;
76 ::ll::TypedStorage<8, 8, ::PackManagerContentSource*> mWorldContentSource;
77 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::EduCloud::IEduCloudSaveSystem>> mEduCloudSaveSystem;
78 ::ll::TypedStorage<1, 1, bool> mLocalCheatsAllowed;
79 ::ll::TypedStorage<4, 4, int> mLocalGameType;
80 ::ll::TypedStorage<4, 4, int> mGameDifficulty;
81 ::ll::TypedStorage<1, 1, ::NetherWorldType> mNetherType;
82 ::ll::TypedStorage<8, 48, ::SpawnSettings> mSpawnSettings;
83 ::ll::TypedStorage<1, 1, bool> mGameVersionOverrideEnabled;
84 ::ll::TypedStorage<8, 32, ::std::string> mGameVersionOverride;
85 ::ll::TypedStorage<8, 32, ::std::string> mInitialPackId;
86 ::ll::TypedStorage<1, 1, bool> mRefreshLevelData;
87 ::ll::TypedStorage<1, 1, bool> mAttemptedToCreateNewWorld;
88 ::ll::TypedStorage<1, 1, bool> mHackStatusVariableToTrackWorldCreationUntilWeFixInputBufferingOnUIStack;
89 ::ll::TypedStorage<8, 720, ::Realms::World> mRealmWorld;
90 ::ll::TypedStorage<8, 24, ::std::vector<int>> mServerSimDistanceOptionValues;
91 ::ll::TypedStorage<8, 24, ::std::vector<int>> mSleepPercentOptionValues;
92 ::ll::TypedStorage<1, 1, bool> mHasRealms;
93 ::ll::TypedStorage<1, 1, bool> mSleepEnabled;
94 ::ll::TypedStorage<
95 8,
96 24,
97 ::std::vector<::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>>>
98 mOriginalGameRuleValueCache;
99 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IContentManagerContext>> mContentManagerContext;
100 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WorldSettingsScreenControllerProxy>> mProxy;
101 ::ll::TypedStorage<8, 64, ::std::function<void()>> mOnOpenCallback;
102 ::ll::TypedStorage<
103 8,
104 16,
105 ::Bedrock::Threading::Async<::Bedrock::Result<::MSGraph::Models::DriveItem, ::MSGraph::Models::GraphError>>>
106 mGetCloudItemByIdHandle;
107 ::ll::TypedStorage<8, 32, ::std::string> mCloudFileName;
108 ::ll::TypedStorage<8, 32, ::std::string> mCloudLastChanged;
109 ::ll::TypedStorage<1, 1, bool> mCanEditGameModeInEdu;
110 ::ll::TypedStorage<1, 1, bool> mUnhideServerSettings;
111 // NOLINTEND
112
113public:
114 // prevent constructor by default
115 WorldSettingsScreenController& operator=(WorldSettingsScreenController const&);
116 WorldSettingsScreenController(WorldSettingsScreenController const&);
117 WorldSettingsScreenController();
118
119public:
120 // virtual functions
121 // NOLINTBEGIN
122 virtual ~WorldSettingsScreenController() /*override*/ = default;
123
124 virtual void onCreation() /*override*/;
125
126 virtual void onOpen() /*override*/;
127
128 virtual void onTerminate() /*override*/;
129
130 virtual void onLevelDeleted(::std::string const& levelId) /*override*/;
131
132 virtual void onStorageChanged() /*override*/;
133
134 virtual ::ui::DirtyFlag tick() /*override*/;
135
136 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
137
138 virtual bool hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea) /*override*/;
139
140 virtual void saveWorld() /*override*/;
141
142 virtual ::LevelSummary& getLevelSummary() /*override*/;
143
144 virtual ::LevelData& getLevelData() /*override*/;
145
146 virtual void _registerControllerCallbacks();
147
148 virtual void _displayLockedWorldPopup() /*override*/;
149 // NOLINTEND
150
151public:
152 // member functions
153 // NOLINTBEGIN
154 MCAPI WorldSettingsScreenController(
155 ::std::shared_ptr<::MainMenuScreenModel> model,
156 bool createWorld,
157 bool unhideServerSettings
158 );
159
160 MCAPI WorldSettingsScreenController(
161 ::std::shared_ptr<::MainMenuScreenModel> model,
162 ::LevelSummary const& levelSummary,
163 bool createFromTemplate,
164 ::std::function<void()> onOpenCallback,
165 ::std::string initialPackId,
166 bool unhideServerSettings
167 );
168
169 MCAPI bool _canChangeWorldOption() const;
170
171 MCAPI bool _canEditDifficulty();
172
173 MCAPI void _copyAndSetDataHelper(::std::function<void(::LevelData&)> setDataCallback);
174
175 MCAPI ::ui::ViewRequest _copyWorld(::std::function<void(::LevelData&)> setDataCallback, bool leaveScreen);
176
177 MCAPI ::ui::ViewRequest _createWorld(::PostCreateWorldAction postCreateWorldAction);
178
179 MCAPI int _getDifficulty();
180
181 MCAPI bool _getMultiplayerEnabled() const;
182
183 MCAPI ::std::string _getPlatformMultiplayerWarningText() const;
184
185 MCAPI ::std::string _getWorldName();
186
187 MCAPI ::std::string _getXBLMultiplayerWarningText() const;
188
189 MCAPI void _init();
190
191 MCAPI bool _isGameRuleEnabled() const;
192
193 MCAPI bool _passedLockedContentCheck();
194
195 MCAPI void _selectRealm(::std::function<void(::Realms::World)> callback);
196
197 MCAPI void _setAllowCheatsHelper(bool value);
198
199 MCAPI void _setDefaultPermissionLevelHelper(::PlayerPermissionLevel value);
200
201 MCAPI void _setGameRule(bool value, ::GameRuleId gameRuleId, bool suppressOuput);
202
203 MCAPI void _setGameRule(int value, ::GameRuleId gameRuleId, bool suppressOuput);
204
205 MCAPI void _setLevelEditorWorldFlag();
206
207 MCAPI void _setMultiplayerEnabled(bool value);
208
209 MCAPI void _setWorldGameModeHelper(int value);
210
211 MCAPI void _setWorldName(::std::string value);
212
213 MCAPI void _setWorldTypeHelper(int value);
214
215 MCAPI ::ui::ViewRequest _startEducationWorld(bool shouldHost);
216
217 MCAPI void confirmationExperimentalGameplayDialog(
218 ::std::string const& messageId,
219 ::std::function<void(::ModalScreenButtonId)> callback
220 );
221 // NOLINTEND
222
223public:
224 // static functions
225 // NOLINTBEGIN
226 MCAPI static void addStaticScreenVars(::Json::Value& globalVars, bool exportDisabled, bool isMultiplayerClient);
227 // NOLINTEND
228
229public:
230 // constructor thunks
231 // NOLINTBEGIN
232 MCAPI void* $ctor(::std::shared_ptr<::MainMenuScreenModel> model, bool createWorld, bool unhideServerSettings);
233
234 MCAPI void* $ctor(
235 ::std::shared_ptr<::MainMenuScreenModel> model,
236 ::LevelSummary const& levelSummary,
237 bool createFromTemplate,
238 ::std::function<void()> onOpenCallback,
239 ::std::string initialPackId,
240 bool unhideServerSettings
241 );
242 // NOLINTEND
243
244public:
245 // virtual function thunks
246 // NOLINTBEGIN
247 MCAPI void $onCreation();
248
249 MCAPI void $onOpen();
250
251 MCAPI void $onTerminate();
252
253 MCAPI void $onLevelDeleted(::std::string const& levelId);
254
255 MCAPI void $onStorageChanged();
256
257 MCAPI ::ui::DirtyFlag $tick();
258
259 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
260
261 MCAPI bool $hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea);
262
263 MCAPI void $saveWorld();
264
265 MCFOLD ::LevelSummary& $getLevelSummary();
266
267 MCAPI ::LevelData& $getLevelData();
268
269 MCAPI void $_registerControllerCallbacks();
270
271 MCAPI void $_displayLockedWorldPopup();
272 // NOLINTEND
273};
Definition FileStorageArea.h:30
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
Definition IEduCloudSaveSystem.h:7
Definition GameRuleId.h:8
Definition DriveItem.h:7
Definition GraphError.h:7
Definition PackManagerContentSource.h:5