diff --git a/src/settings.cpp b/src/settings.cpp index f2aab5197a..739b9fca5a 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1604,7 +1604,7 @@ void IntSettingDesc::ChangeValue(const void *object, int32_t newval) const this->Write(object, newval); if (this->post_callback != nullptr) this->post_callback(newval); - if (this->flags & SF_NO_NETWORK) { + if (HasFlag(this->flags, SF_NO_NETWORK) || HasFlag(this->flags, SF_SANDBOX)) { _gamelog.StartAction(GLAT_SETTING); _gamelog.Setting(this->GetName(), oldval, newval); _gamelog.StopAction(); diff --git a/src/settings_internal.h b/src/settings_internal.h index 765cac2fa7..1648d36544 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -27,6 +27,7 @@ enum SettingFlag : uint16_t { SF_NOT_IN_SAVE = 1 << 10, ///< Do not save with savegame, basically client-based. SF_NOT_IN_CONFIG = 1 << 11, ///< Do not save to config file. SF_NO_NETWORK_SYNC = 1 << 12, ///< Do not synchronize over network (but it is saved if SF_NOT_IN_SAVE is not set). + SF_SANDBOX = 1 << 13, ///< This setting is a sandbox setting. }; DECLARE_ENUM_AS_BIT_SET(SettingFlag) diff --git a/src/table/settings/difficulty_settings.ini b/src/table/settings/difficulty_settings.ini index 4e8e1044a9..2b99c563f5 100644 --- a/src/table/settings/difficulty_settings.ini +++ b/src/table/settings/difficulty_settings.ini @@ -301,6 +301,7 @@ cat = SC_BASIC [SDT_BOOL] var = difficulty.infinite_money +flags = SF_SANDBOX def = false str = STR_CONFIG_SETTING_INFINITE_MONEY strhelp = STR_CONFIG_SETTING_INFINITE_MONEY_HELPTEXT