Skip to content
LeviMC
English
AutoLightDark
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, 1712, ::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
155 ::std::shared_ptr<::MainMenuScreenModel> model,
156 bool createWorld,
157 bool unhideServerSettings
158 );
159
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 MCNAPI bool _canChangeWorldOption() const;
170
171 MCNAPI bool _canEditDifficulty();
172
173 MCNAPI void _copyAndSetDataHelper(::std::function<void(::LevelData&)> setDataCallback);
174
175 MCNAPI ::ui::ViewRequest _copyWorld(::std::function<void(::LevelData&)> setDataCallback, bool leaveScreen);
176
177 MCNAPI ::ui::ViewRequest _createWorld(::PostCreateWorldAction postCreateWorldAction);
178
179 MCNAPI int _getDifficulty();
180
181 MCNAPI ::std::string _getPlatformMultiplayerWarningText() const;
182
183 MCNAPI ::std::string _getWorldName();
184
185 MCNAPI ::std::string _getXBLMultiplayerWarningText() const;
186
187 MCNAPI void _init();
188
190
191 MCNAPI void _selectRealm(::std::function<void(::Realms::World)> callback);
192
193 MCNAPI void _setAllowCheatsHelper(bool value);
194
195 MCNAPI void _setDefaultPermissionLevelHelper(::PlayerPermissionLevel value);
196
197 MCNAPI void _setGameRule(bool value, ::GameRuleId gameRuleId, bool suppressOuput);
198
199 MCNAPI void _setGameRule(int value, ::GameRuleId gameRuleId, bool suppressOuput);
200
201 MCNAPI void _setMultiplayerEnabled(bool value);
202
203 MCNAPI void _setWorldGameModeHelper(int value);
204
205 MCNAPI void _setWorldName(::std::string value);
206
207 MCNAPI void _setWorldTypeHelper(int value);
208
210
211 MCNAPI ::ui::ViewRequest _startEducationWorld(bool shouldHost);
212
214 ::std::string const& messageId,
215 ::std::function<void(::ModalScreenButtonId)> callback
216 );
217 // NOLINTEND
218
219public:
220 // static functions
221 // NOLINTBEGIN
222 MCNAPI static void addStaticScreenVars(::Json::Value& globalVars, bool exportDisabled, bool isMultiplayerClient);
223 // NOLINTEND
224
225public:
226 // constructor thunks
227 // NOLINTBEGIN
228 MCNAPI void* $ctor(::std::shared_ptr<::MainMenuScreenModel> model, bool createWorld, bool unhideServerSettings);
229
230 MCNAPI void* $ctor(
231 ::std::shared_ptr<::MainMenuScreenModel> model,
232 ::LevelSummary const& levelSummary,
233 bool createFromTemplate,
234 ::std::function<void()> onOpenCallback,
235 ::std::string initialPackId,
236 bool unhideServerSettings
237 );
238 // NOLINTEND
239
240public:
241 // virtual function thunks
242 // NOLINTBEGIN
243 MCNAPI void $onCreation();
244
245 MCNAPI void $onOpen();
246
247 MCNAPI void $onTerminate();
248
249 MCNAPI void $onLevelDeleted(::std::string const& levelId);
250
251 MCNAPI void $onStorageChanged();
252
253 MCNAPI ::ui::DirtyFlag $tick();
254
255 MCNAPI void $addStaticScreenVars(::Json::Value& globalVars);
256
257 MCNAPI bool $hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea);
258
259 MCNAPI void $saveWorld();
260
261 MCNAPI ::LevelSummary& $getLevelSummary();
262
263 MCNAPI ::LevelData& $getLevelData();
264
266
268 // NOLINTEND
269};
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:57
Definition LevelListCacheObserver.h:13
Definition MainMenuScreenModel.h:5
Definition PlatformMultiplayerRestrictions.h:5
Definition SettingsScreenControllerBase.h:5
Definition WorldSettingsScreenControllerProxy.h:5
Definition WorldSettingsScreenController.h:5
MCAPI void _setGameRule(int value, ::GameRuleId gameRuleId, bool suppressOuput)
MCAPI void _setAllowCheatsHelper(bool value)
MCAPI bool _canChangeWorldOption() const
MCAPI::ui::ViewRequest _copyWorld(::std::function< void(::LevelData &)> setDataCallback, bool leaveScreen)
MCAPI WorldSettingsScreenController(::std::shared_ptr<::MainMenuScreenModel > model, bool createWorld, bool unhideServerSettings)
MCAPI void _selectRealm(::std::function< void(::Realms::World)> callback)
MCAPI void _setDefaultPermissionLevelHelper(::PlayerPermissionLevel value)
MCAPI bool _shouldShowMultiplayerWarningMessages() const
MCAPI::ui::ViewRequest _startEducationWorld(bool shouldHost)
MCAPI::ui::ViewRequest _createWorld(::PostCreateWorldAction postCreateWorldAction)
MCAPI::LevelSummary & $getLevelSummary()
MCAPI void _setMultiplayerEnabled(bool value)
MCAPI::std::string _getWorldName()
MCAPI bool $hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea > sptStorageArea)
MCAPI WorldSettingsScreenController(::std::shared_ptr<::MainMenuScreenModel > model, ::LevelSummary const &levelSummary, bool createFromTemplate, ::std::function< void()> onOpenCallback, ::std::string initialPackId, bool unhideServerSettings)
MCAPI void _setWorldTypeHelper(int value)
MCAPI void * $ctor(::std::shared_ptr<::MainMenuScreenModel > model, ::LevelSummary const &levelSummary, bool createFromTemplate, ::std::function< void()> onOpenCallback, ::std::string initialPackId, bool unhideServerSettings)
MCAPI void confirmationExperimentalGameplayDialog(::std::string const &messageId, ::std::function< void(::ModalScreenButtonId)> callback)
MCAPI void $onLevelDeleted(::std::string const &levelId)
MCAPI::std::string _getPlatformMultiplayerWarningText() const
static MCAPI void addStaticScreenVars(::Json::Value &globalVars, bool exportDisabled, bool isMultiplayerClient)
MCAPI::std::string _getXBLMultiplayerWarningText() const
MCAPI void _setWorldName(::std::string value)
MCAPI void * $ctor(::std::shared_ptr<::MainMenuScreenModel > model, bool createWorld, bool unhideServerSettings)
MCAPI bool _passedLockedContentCheck()
MCAPI void $_displayLockedWorldPopup()
MCAPI void _setGameRule(bool value, ::GameRuleId gameRuleId, bool suppressOuput)
MCAPI void $addStaticScreenVars(::Json::Value &globalVars)
MCAPI void _copyAndSetDataHelper(::std::function< void(::LevelData &)> setDataCallback)
MCAPI::LevelData & $getLevelData()
MCAPI void $_registerControllerCallbacks()
MCAPI::ui::DirtyFlag $tick()
MCAPI void _setWorldGameModeHelper(int value)
Definition IEduCloudSaveSystem.h:7
Definition GameRuleId.h:8
Definition LevelSummary.h:30
Definition DriveItem.h:7
Definition GraphError.h:7
Definition PackManagerContentSource.h:5
Definition World.h:7