|
OpenTTD Source 20260711-master-g3fb3006dff
|
A log entry for a NewGRF that was moved. More...
#include <gamelog_internal.h>
Public Member Functions | |
| LoggedChangeGRFMoved () | |
| Constructor for savegame loading. | |
| LoggedChangeGRFMoved (GrfID grfid, int32_t offset) | |
| Create a log entry for a moved NewGRF. | |
| 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 | |
| GrfID | grfid {} |
| ID of moved GRF. | |
| int32_t | offset = 0 |
| offset, positive = move down | |
| Data Fields inherited from LoggedChange | |
| GamelogChangeType | ct {} |
| The type of change. | |
A log entry for a NewGRF that was moved.
Definition at line 180 of file gamelog_internal.h.
|
inline |
Constructor for savegame loading.
Definition at line 182 of file gamelog_internal.h.
References LoggedChange::LoggedChange().
|
inline |
Create a log entry for a moved NewGRF.
| grfid | The NewGRF that is moved. |
| offset | The amount the NewGRF was moved. |
Definition at line 189 of file gamelog_internal.h.
References grfid, LoggedChange::LoggedChange(), and offset.
|
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 281 of file gamelog.cpp.
References abs(), AddGrfInfo(), grfid, and offset.
| GrfID LoggedChangeGRFMoved::grfid {} |
ID of moved GRF.
Definition at line 193 of file gamelog_internal.h.
Referenced by FormatTo(), and LoggedChangeGRFMoved().
| int32_t LoggedChangeGRFMoved::offset = 0 |
offset, positive = move down
Definition at line 194 of file gamelog_internal.h.
Referenced by FormatTo(), and LoggedChangeGRFMoved().