Add setting flag to enable upstream mode load when patx_name set
This commit is contained in:
@@ -35,7 +35,7 @@ static std::vector<SaveLoad> GetSettingsDesc(bool is_loading)
|
||||
std::vector<SaveLoad> saveloads;
|
||||
for (auto &sd : GetSettingsTableInternal()) {
|
||||
if (sd->flags & SF_NOT_IN_SAVE) continue;
|
||||
if (sd->patx_name != nullptr) continue;
|
||||
if (sd->patx_name != nullptr && !(is_loading && (sd->flags & SF_ENABLE_UPSTREAM_LOAD))) continue;
|
||||
if (!sd->save.ext_feature_test.IsFeaturePresent(_sl_version, sd->save.version_from, sd->save.version_to)) continue;
|
||||
|
||||
VarType new_type = 0;
|
||||
|
||||
@@ -36,6 +36,7 @@ enum SettingFlag : uint32 {
|
||||
SF_GUI_ADVISE_DEFAULT = 1 << 19, ///< Advise the user to leave this setting at its default value
|
||||
SF_ENUM_PRE_CB_VALIDATE = 1 << 20, ///< Call the pre_check callback for enum incoming value validation
|
||||
SF_CONVERT_BOOL_TO_INT = 1 << 21, ///< Accept a boolean value when loading an int-type setting from the config file
|
||||
SF_ENABLE_UPSTREAM_LOAD = 1 << 22, ///< Enable loading from upstream mode savegames even when patx_name is set
|
||||
};
|
||||
DECLARE_ENUM_AS_BIT_SET(SettingFlag)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user