|
OpenTTD Source 20260711-master-g3fb3006dff
|
A log entry for changing a setting. More...
#include <gamelog_internal.h>
Public Member Functions | |
| LoggedChangeSettingChanged () | |
| Constructor for savegame loading. | |
| LoggedChangeSettingChanged (const std::string &name, int32_t oldval, int32_t newval) | |
| Create the log entry. | |
| void | FormatTo (std::back_insert_iterator< std::string > &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override |
| Format the content of this change into the given output. | |
| Public Member Functions inherited from LoggedChange | |
| LoggedChange (GamelogChangeType type=GamelogChangeType::None) | |
| Create the log entry. | |
| virtual | ~LoggedChange ()=default |
| Ensure the destructor of the sub classes are called as well. | |
Data Fields | |
| std::string | name {} |
| name of the setting | |
| int32_t | oldval = 0 |
| old value | |
| int32_t | newval = 0 |
| new value | |
| Data Fields inherited from LoggedChange | |
| GamelogChangeType | ct {} |
| The type of change. | |
A log entry for changing a setting.
Definition at line 198 of file gamelog_internal.h.
|
inline |
Constructor for savegame loading.
Definition at line 200 of file gamelog_internal.h.
References LoggedChange::LoggedChange().
|
inline |
Create the log entry.
| name | The name of the setting. |
| oldval | The value before the change. |
| newval | The value after the change. |
Definition at line 208 of file gamelog_internal.h.
References LoggedChange::LoggedChange(), name, newval, and oldval.
|
overridevirtual |
Format the content of this change into the given output.
| output_iterator | Destination of the formatted content. |
| grf_names | Cache/mapping of names of NewGRFs seen in the logs. |
| action_type | The context in which this method was called. |
Implements LoggedChange.
Definition at line 223 of file gamelog.cpp.
| std::string LoggedChangeSettingChanged::name {} |
name of the setting
Definition at line 212 of file gamelog_internal.h.
Referenced by FormatTo(), and LoggedChangeSettingChanged().
| int32_t LoggedChangeSettingChanged::newval = 0 |
new value
Definition at line 214 of file gamelog_internal.h.
Referenced by FormatTo(), and LoggedChangeSettingChanged().
| int32_t LoggedChangeSettingChanged::oldval = 0 |
old value
Definition at line 213 of file gamelog_internal.h.
Referenced by FormatTo(), and LoggedChangeSettingChanged().