OpenTTD Source 20260531-master-g0e951f3528
LoggedChangeMode Struct Reference

Log element for the change of the game mode and landscape. More...

#include <gamelog_internal.h>

Inheritance diagram for LoggedChangeMode:
LoggedChange

Public Member Functions

 LoggedChangeMode ()
 Constructor for savegame loading.
 LoggedChangeMode (GameMode mode, LandscapeType landscape)
 Create the log for changing the game mode.
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=GLCT_NONE)
virtual ~LoggedChange ()=default
 Ensure the destructor of the sub classes are called as well.

Data Fields

GameMode mode {}
 new game mode - Editor x Game
LandscapeType landscape {}
 landscape (temperate, arctic, ...)
Data Fields inherited from LoggedChange
GamelogChangeType ct {}

Detailed Description

Log element for the change of the game mode and landscape.

Definition at line 50 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeMode() [1/2]

LoggedChangeMode::LoggedChangeMode ( )
inline

Constructor for savegame loading.

Definition at line 52 of file gamelog_internal.h.

References GLCT_MODE.

◆ LoggedChangeMode() [2/2]

LoggedChangeMode::LoggedChangeMode ( GameMode mode,
LandscapeType landscape )
inline

Create the log for changing the game mode.

Parameters
modeThe new GameMode.
landscapeThe new landscape.

Definition at line 59 of file gamelog_internal.h.

References GLCT_MODE, landscape, and mode.

Member Function Documentation

◆ FormatTo()

void LoggedChangeMode::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 172 of file gamelog.cpp.

References landscape, and mode.

Field Documentation

◆ landscape

LandscapeType LoggedChangeMode::landscape {}

landscape (temperate, arctic, ...)

Definition at line 64 of file gamelog_internal.h.

Referenced by FormatTo(), LoggedChangeMode(), and Gamelog::TestMode().

◆ mode

GameMode LoggedChangeMode::mode {}

new game mode - Editor x Game

Definition at line 63 of file gamelog_internal.h.

Referenced by FormatTo(), LoggedChangeMode(), and Gamelog::TestMode().


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