OpenTTD Source 20260711-master-g3fb3006dff
LoggedChangeGRFParameterChanged Struct Reference

A log entry for a NewGRF for which a parameter was changed. More...

#include <gamelog_internal.h>

Inheritance diagram for LoggedChangeGRFParameterChanged:
LoggedChange

Public Member Functions

 LoggedChangeGRFParameterChanged ()
 Constructor for savegame loading.
 LoggedChangeGRFParameterChanged (GrfID grfid)
 Create a log entry for a parameter change of a 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 GRF with changed parameters.
Data Fields inherited from LoggedChange
GamelogChangeType ct {}
 The type of change.

Detailed Description

A log entry for a NewGRF for which a parameter was changed.

Definition at line 164 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeGRFParameterChanged() [1/2]

LoggedChangeGRFParameterChanged::LoggedChangeGRFParameterChanged ( )
inline

Constructor for savegame loading.

Definition at line 166 of file gamelog_internal.h.

References LoggedChange::LoggedChange().

◆ LoggedChangeGRFParameterChanged() [2/2]

LoggedChangeGRFParameterChanged::LoggedChangeGRFParameterChanged ( GrfID grfid)
inline

Create a log entry for a parameter change of a NewGRF.

Parameters
grfidThe NewGRF for which the parameter is changed.

Definition at line 172 of file gamelog_internal.h.

References grfid, and LoggedChange::LoggedChange().

Member Function Documentation

◆ FormatTo()

void LoggedChangeGRFParameterChanged::FormatTo ( std::back_insert_iterator< std::string > & output_iterator,
GrfIDMapping & grf_names,
GamelogActionType action_type )
overridevirtual

Format the content of this change into the given output.

Parameters
output_iteratorDestination of the formatted content.
grf_namesCache/mapping of names of NewGRFs seen in the logs.
action_typeThe context in which this method was called.

Implements LoggedChange.

Definition at line 272 of file gamelog.cpp.

References AddGrfInfo(), and grfid.

Field Documentation

◆ grfid

GrfID LoggedChangeGRFParameterChanged::grfid {}

ID of GRF with changed parameters.

Definition at line 176 of file gamelog_internal.h.

Referenced by FormatTo(), and LoggedChangeGRFParameterChanged().


The documentation for this struct was generated from the following files: