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/core/file/PathBuffer.h"
17#include "mc/deps/core/threading/Async.h"
18#include "mc/deps/core/utility/NonOwnerPointer.h"
19#include "mc/platform/Result.h"
20#include "mc/server/commands/PlayerPermissionLevel.h"
21#include "mc/world/level/FileArchiver.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; }
54 using GameRuleValueMapping = ::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>;
56 using GameRuleValueMappingList =
57 ::std::vector<::std::tuple<::std::string, ::std::variant<::cereal::NullType, bool, int, float>>>;
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;
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;
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;
116 WorldSettingsScreenController& operator=(WorldSettingsScreenController
const&);
117 WorldSettingsScreenController(WorldSettingsScreenController
const&);
118 WorldSettingsScreenController();
123 virtual ~WorldSettingsScreenController() ;
125 virtual void onCreation() ;
127 virtual void onOpen() ;
129 virtual void onTerminate() ;
131 virtual void onLevelDeleted(::std::string
const& levelId) ;
133 virtual void onStorageChanged() ;
135 virtual ::ui::DirtyFlag tick() ;
137 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
139 virtual bool hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea) ;
141 virtual void saveWorld() ;
143 virtual ::LevelSummary& getLevelSummary() ;
145 virtual ::LevelData& getLevelData() ;
147 virtual void _registerControllerCallbacks();
149 virtual void _displayLockedWorldPopup() ;
155 MCAPI WorldSettingsScreenController(
156 ::std::shared_ptr<::MainMenuScreenModel> model,
158 bool unhideServerSettings
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
170 MCAPI
bool _achievementsWillBeDisabledOnLoad();
172 MCAPI
void _cacheGameRuleValues();
174 MCAPI
void _calculateSleepPercentageOptions();
176 MCAPI
bool _canChangeWorldOption()
const;
178 MCAPI
void _confirmationUnlockTemplatedWorldOptionsDialog();
180 MCAPI
void _copyAndSetDataHelper(::std::function<
void(::LevelData&)> setDataCallback);
182 MCAPI ::ui::ViewRequest _copyWorld(::std::function<
void(::LevelData&)> setDataCallback,
bool leaveScreen);
184 MCAPI ::ui::ViewRequest _createWorld(::PostCreateWorldAction postCreateWorldAction);
186 MCAPI
void _createWorldOnRealms();
188 MCAPI ::ui::ViewRequest _deleteWorld();
190 MCAPI ::ui::ViewRequest _exportWorld(::FileArchiver::ExportType type);
192 MCAPI
void _fireCachedGameRuleTelemetryEventsOnExit();
194 MCAPI
bool _getAllowCheats()
const;
196 MCAPI
int _getDifficulty();
198 MCAPI
bool _getGameRuleBool(::GameRuleId gameRuleId);
200 MCAPI
int _getGameRuleInt(::GameRuleId gameRuleId);
202 MCAPI
bool _getMultiplayerEnabled()
const;
204 MCAPI ::std::string _getPlatformMultiplayerWarningText()
const;
206 MCAPI uint _getRespawnRadiusMax();
208 MCAPI
int _getWorldGameMode();
210 MCAPI ::std::string _getWorldName();
212 MCAPI
int _getWorldType();
214 MCAPI ::std::string _getXBLMultiplayerWarningText()
const;
216 MCAPI
bool _hasOperatorCommandsAbility()
const;
220 MCAPI
bool _isExperimentEnabled(
int experimentIndex);
222 MCAPI
bool _isGameRuleEnabled()
const;
224 MCAPI
bool _isMultiplayerModifiable()
const;
226 MCAPI
void _limitSpawnRadiusAgainstWorldType();
228 MCAPI
bool _passedLockedContentCheck();
230 MCAPI
void _playWorldOnRealms();
232 MCAPI
void _registerWorldsClipboardSubController();
234 MCAPI ::ui::ViewRequest _resetRandomTickSpeed();
236 MCAPI
void _selectRealm(::std::function<
void(::Realms::World)> callback);
238 MCAPI
void _setAllowCheats(
bool value);
240 MCAPI
void _setAllowCheatsHelper(
bool value);
242 MCAPI
void _setAlwaysDay(
bool value);
244 MCAPI
void _setDefaultPermissionLevel(::PlayerPermissionLevel newPermission);
246 MCAPI
void _setDefaultPermissionLevelHelper(::PlayerPermissionLevel value);
248 MCAPI
void _setDifficulty(
int value);
250 MCAPI
void _setEducationFeaturesEnabled(
bool value);
252 MCAPI
void _setExperimentHelper(
bool value,
int experimentIndex);
254 MCAPI
void _setExperimentalToggleHelper(
bool value,
int experimentIndex);
256 MCAPI
void _setGameRule(
int value, ::GameRuleId gameRuleId,
bool suppressOuput);
258 MCAPI
void _setGameRule(
bool value, ::GameRuleId gameRuleId,
bool suppressOuput);
260 MCAPI
void _setHasUserRealms();
262 MCAPI
void _setImmutableWorld(
bool value);
264 MCAPI
void _setLevelEditorWorldFlag();
266 MCAPI
void _setMultiplayerEnabled(
bool value);
268 MCAPI
void _setPlayerGameMode(
int value);
270 MCAPI
void _setRandomTickSpeedString(::std::string
const& value);
272 MCAPI
void _setServerVisible(
bool value);
274 MCAPI
void _setWorldGameMode(
int value);
276 MCAPI
void _setWorldGameModeHelper(
int value);
278 MCAPI
void _setWorldName(::std::string value);
280 MCAPI
void _setWorldType(
int value);
282 MCAPI
void _setWorldTypeHelper(
int value);
284 MCAPI
void _setupCloudBindings();
286 MCAPI
bool _shouldShowMultiplayerWarningMessages()
const;
288 MCAPI
void _showConfirmationNoCrossPlatformPlaySkinPopup();
290 MCAPI ::ui::ViewRequest _startEducationWorld(
bool shouldHost);
292 MCAPI
void confirmationExperimentalGameplayDialog(
293 ::std::string
const& messageId,
294 ::std::function<
void(::ModalScreenButtonId)> callback
301 MCAPI
void* $ctor(::std::shared_ptr<::MainMenuScreenModel> model,
bool createWorld,
bool unhideServerSettings);
304 ::std::shared_ptr<::MainMenuScreenModel> model,
305 ::LevelSummary
const& levelSummary,
306 bool createFromTemplate,
307 ::std::function<
void()> onOpenCallback,
308 ::std::string initialPackId,
309 bool unhideServerSettings
322 MCAPI
void $onCreation();
324 MCAPI
void $onOpen();
326 MCAPI
void $onTerminate();
328 MCAPI
void $onLevelDeleted(::std::string
const& levelId);
330 MCAPI
void $onStorageChanged();
332 MCAPI ::ui::DirtyFlag $tick();
334 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
336 MCAPI
bool $hasAvailableSpaceForLevel(::std::shared_ptr<::Core::FileStorageArea> sptStorageArea);
338 MCAPI
void $saveWorld();
340 MCFOLD ::LevelSummary& $getLevelSummary();
342 MCAPI ::LevelData& $getLevelData();
344 MCAPI
void $_registerControllerCallbacks();
346 MCAPI
void $_displayLockedWorldPopup();
Definition FileStorageArea.h:32
Definition DlcUIWrapper.h:5
Definition IContentManagerContext.h:5
Definition IContentManager.h:5
Definition IWorldSettingsStorage.h:5
Definition LevelData.h:52
Definition LevelListCacheObserver.h:13
Definition MainMenuScreenModel.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 GraphError.h:7
Definition PackManagerContentSource.h:5