OpenTTD Source 20260711-master-g3fb3006dff
LoggedChangeGRFChanged Struct Reference

A log entry for a NewGRF that was changed. More...

#include <gamelog_internal.h>

Inheritance diagram for LoggedChangeGRFChanged:
LoggedChange GRFIdentifier

Public Member Functions

 LoggedChangeGRFChanged ()
 Constructor for savegame loading.
 LoggedChangeGRFChanged (const GRFIdentifier &ident)
 Create a log entry for a changed 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.
Public Member Functions inherited from GRFIdentifier
bool HasGrfIdentifier (GrfID grfid, const MD5Hash *md5sum) const
 Does the identification match the provided values?

Additional Inherited Members

Data Fields inherited from LoggedChange
GamelogChangeType ct {}
 The type of change.
Data Fields inherited from GRFIdentifier
GrfID grfid
 GRF ID (defined by Action 0x08).
MD5Hash md5sum
 MD5 checksum of file to distinguish files with the same GRF ID (eg. newer version of GRF).

Detailed Description

A log entry for a NewGRF that was changed.

Definition at line 150 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeGRFChanged() [1/2]

LoggedChangeGRFChanged::LoggedChangeGRFChanged ( )
inline

Constructor for savegame loading.

Definition at line 152 of file gamelog_internal.h.

References LoggedChange::LoggedChange().

◆ LoggedChangeGRFChanged() [2/2]

LoggedChangeGRFChanged::LoggedChangeGRFChanged ( const GRFIdentifier & ident)
inline

Create a log entry for a changed NewGRF.

Parameters
identThe NewGRF that is changed.

Definition at line 158 of file gamelog_internal.h.

References LoggedChange::LoggedChange().

Member Function Documentation

◆ FormatTo()

void LoggedChangeGRFChanged::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 262 of file gamelog.cpp.

References AddGrfInfo(), Exact, FindGRFConfig(), GRFIdentifier::grfid, and GRFIdentifier::md5sum.


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