Skip to content

Add SettingDataVersion and Introduce SettingFixer#1097

Open
jvnpr wants to merge 2 commits intosmartcmd:mainfrom
jvnpr:main
Open

Add SettingDataVersion and Introduce SettingFixer#1097
jvnpr wants to merge 2 commits intosmartcmd:mainfrom
jvnpr:main

Conversation

@jvnpr
Copy link

@jvnpr jvnpr commented Mar 10, 2026

Description

Adds a new game setting to store settings data version, and creates the SettingFixer function to deal with conversions.

Changes

Previous Behavior

The game has no way of knowing what build a settings file was created for, or if any conversions need to be performed.

New Behavior

Setting files now store a data version.

Fix Implementation

Creates a new game setting eGameSetting_SettingDataVersion and associated uiSettingDataVersion to store the current version of the given settings file.

Creates the following functions of the class CMinecraftApp:

  • SettingFixer(): Called from Windows64_Minecraft at game launch, runs checks to see if a setting file exists, and if one does, what settings data version it has. If the settings data version does not match the currentSettingDataVersion, it will perform any necessary conversions to settings data. At the moment, no conversions are implemented.
  • GetSettingsFileLoaded() and SetSettingsFileLoaded(): Two new helper functions which modify the class variable static bool settingFileLoaded

Modifies Win64_LoadSettings() to call SetSettingsFileLoaded(true); when a settings file has been successfully loaded.

AI Use Disclosure

No AI was used to author these changes or pull request.

Related Issues

@jvnpr jvnpr mentioned this pull request Mar 10, 2026
@jvnpr jvnpr marked this pull request as ready for review March 11, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant