3#include "mc/_HeaderOutputPredefine.h"
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"
43namespace Json {
class Value; }
44namespace MSGraph::Models {
struct DriveItem; }
45namespace MSGraph::Models {
struct GraphError; }
53 using GameRuleValueMapping = ::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>;
55 using GameRuleValueMappingList =
56 ::std::vector<::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>>;
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;
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;
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;
115 WorldSettingsScreenController& operator=(WorldSettingsScreenController
const&);
116 WorldSettingsScreenController(WorldSettingsScreenController
const&);
117 WorldSettingsScreenController();
122 virtual ~WorldSettingsScreenController() =
default;
124 virtual void onCreation() ;
126 virtual void onOpen() ;
128 virtual void onTerminate() ;
130 virtual void onLevelDeleted(::std::string
const& levelId) ;
132 virtual void onStorageChanged() ;
134 virtual ::ui::DirtyFlag tick() ;
136 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
138 virtual bool hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea) ;
140 virtual void saveWorld() ;
142 virtual ::LevelSummary& getLevelSummary() ;
144 virtual ::LevelData& getLevelData() ;
146 virtual void _registerControllerCallbacks();
148 virtual void _displayLockedWorldPopup() ;
154 MCAPI WorldSettingsScreenController(
155 ::std::shared_ptr<::MainMenuScreenModel> model,
157 bool unhideServerSettings
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
169 MCAPI
bool _canChangeWorldOption()
const;
171 MCAPI
bool _canEditDifficulty();
173 MCAPI
void _copyAndSetDataHelper(::std::function<
void(::LevelData&)> setDataCallback);
175 MCAPI ::ui::ViewRequest _copyWorld(::std::function<
void(::LevelData&)> setDataCallback,
bool leaveScreen);
177 MCAPI ::ui::ViewRequest _createWorld(::PostCreateWorldAction postCreateWorldAction);
179 MCAPI
int _getDifficulty();
181 MCAPI
bool _getMultiplayerEnabled()
const;
183 MCAPI ::std::string _getPlatformMultiplayerWarningText()
const;
185 MCAPI ::std::string _getWorldName();
187 MCAPI ::std::string _getXBLMultiplayerWarningText()
const;
191 MCAPI
bool _isGameRuleEnabled()
const;
193 MCAPI
bool _passedLockedContentCheck();
195 MCAPI
void _selectRealm(::std::function<
void(::Realms::World)> callback);
197 MCAPI
void _setAllowCheatsHelper(
bool value);
199 MCAPI
void _setDefaultPermissionLevelHelper(::PlayerPermissionLevel value);
201 MCAPI
void _setGameRule(
bool value, ::GameRuleId gameRuleId,
bool suppressOuput);
203 MCAPI
void _setGameRule(
int value, ::GameRuleId gameRuleId,
bool suppressOuput);
205 MCAPI
void _setLevelEditorWorldFlag();
207 MCAPI
void _setMultiplayerEnabled(
bool value);
209 MCAPI
void _setWorldGameModeHelper(
int value);
211 MCAPI
void _setWorldName(::std::string value);
213 MCAPI
void _setWorldTypeHelper(
int value);
215 MCAPI ::ui::ViewRequest _startEducationWorld(
bool shouldHost);
217 MCAPI
void confirmationExperimentalGameplayDialog(
218 ::std::string
const& messageId,
219 ::std::function<
void(::ModalScreenButtonId)> callback
226 MCAPI
static void addStaticScreenVars(::Json::Value& globalVars,
bool exportDisabled,
bool isMultiplayerClient);
232 MCAPI
void* $ctor(::std::shared_ptr<::MainMenuScreenModel> model,
bool createWorld,
bool unhideServerSettings);
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
247 MCAPI
void $onCreation();
249 MCAPI
void $onOpen();
251 MCAPI
void $onTerminate();
253 MCAPI
void $onLevelDeleted(::std::string
const& levelId);
255 MCAPI
void $onStorageChanged();
257 MCAPI ::ui::DirtyFlag $tick();
259 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
261 MCAPI
bool $hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea);
263 MCAPI
void $saveWorld();
265 MCFOLD ::LevelSummary& $getLevelSummary();
267 MCAPI ::LevelData& $getLevelData();
269 MCAPI
void $_registerControllerCallbacks();
271 MCAPI
void $_displayLockedWorldPopup();
Definition FileStorageArea.h:30
Definition DlcUIWrapper.h:5
Definition IContentManagerContext.h:5
Definition IContentManager.h:5
Definition IWorldSettingsStorage.h:5
Definition LevelData.h:55
Definition LevelListCacheObserver.h:13
Definition MainMenuScreenModel.h:5
Definition SettingsScreenControllerBase.h:5
Definition WorldSettingsScreenControllerProxy.h:5
Definition WorldSettingsScreenController.h:5
Definition IEduCloudSaveSystem.h:7
Definition GameRuleId.h:8
Definition GraphError.h:7
Definition PackManagerContentSource.h:5