1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Change: Log changes to sandbox settings. (#13267)

One of the features of cheats is that there is a record of a cheat being used.

As cheats are slowly ending up in settings instead, add a flag so that changes to these sandbox settings are logged.
This commit is contained in:
Peter Nelson
2025-01-03 23:12:49 +00:00
committed by GitHub
parent ef87acc1ff
commit d38ecd6525
3 changed files with 3 additions and 1 deletions

View File

@@ -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();