OpenTTD Source 20260711-master-g3fb3006dff
LoggedChangeGRFBug Struct Reference

A log entry for a NewGRF bug. More...

#include <gamelog_internal.h>

Inheritance diagram for LoggedChangeGRFBug:
LoggedChange

Public Member Functions

 LoggedChangeGRFBug ()
 Constructor for savegame loading.
 LoggedChangeGRFBug (uint64_t data, GrfID grfid, GRFBug bug)
 Create a NewGRF bug 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

uint64_t data = 0
 additional data
GrfID grfid {}
 ID of problematic GRF.
GRFBug bug {}
 type of bug,
Data Fields inherited from LoggedChange
GamelogChangeType ct {}
 The type of change.

Detailed Description

A log entry for a NewGRF bug.

Definition at line 218 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeGRFBug() [1/2]

LoggedChangeGRFBug::LoggedChangeGRFBug ( )
inline

Constructor for savegame loading.

Definition at line 220 of file gamelog_internal.h.

References LoggedChange::LoggedChange().

◆ LoggedChangeGRFBug() [2/2]

LoggedChangeGRFBug::LoggedChangeGRFBug ( uint64_t data,
GrfID grfid,
GRFBug bug )
inline

Create a NewGRF bug log entry.

Parameters
dataBug specific extra data for identifying the buggy entry.
grfidThe NewGRF that is deemed buggy.
bugThe bug that has been seen.

Definition at line 228 of file gamelog_internal.h.

References bug, data, grfid, and LoggedChange::LoggedChange().

Member Function Documentation

◆ FormatTo()

void LoggedChangeGRFBug::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 291 of file gamelog.cpp.

References AddGrfInfo(), bug, data, grfid, and VehLength.

Field Documentation

◆ bug

GRFBug LoggedChangeGRFBug::bug {}

type of bug,

See also
enum GRFBugs

Definition at line 234 of file gamelog_internal.h.

Referenced by FormatTo(), Gamelog::GRFBugReverse(), and LoggedChangeGRFBug().

◆ data

uint64_t LoggedChangeGRFBug::data = 0

additional data

Definition at line 232 of file gamelog_internal.h.

Referenced by FormatTo(), Gamelog::GRFBugReverse(), and LoggedChangeGRFBug().

◆ grfid

GrfID LoggedChangeGRFBug::grfid {}

ID of problematic GRF.

Definition at line 233 of file gamelog_internal.h.

Referenced by FormatTo(), Gamelog::GRFBugReverse(), and LoggedChangeGRFBug().


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