10#ifndef GAMELOG_INTERNAL_H
11#define GAMELOG_INTERNAL_H
30using GrfIDMapping = std::map<uint32_t, GRFPresence>;
35 virtual void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type) = 0;
44 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
54 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
66 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
76 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
83 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
92 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
99 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
108 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
118 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
129 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
138 void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names,
GamelogActionType action_type)
override;
144 std::vector<std::unique_ptr<LoggedChange>>
change;
150 std::vector<LoggedAction> action;
Functions to be called to log fundamental changes to the game.
GamelogChangeType
Type of logged change.
@ GLCT_MODE
Scenario editor x Game, different landscape.
@ GLCT_OLDVER
Loaded from savegame without logged data.
@ GLCT_SETTING
Non-networksafe setting value changed.
@ GLCT_GRFCOMPAT
Loading compatible GRF.
@ GLCT_GRFADD
Removed GRF.
@ GLCT_EMERGENCY
Emergency savegame.
@ GLCT_GRFPARAM
GRF parameter changed.
@ GLCT_GRFMOVE
GRF order changed.
@ GLCT_GRFBUG
GRF bug triggered.
@ GLCT_REVISION
Changed game revision string.
@ GLCT_NONE
In savegames, end of list.
GamelogActionType
The actions we log.
Types related to the landscape.
LandscapeType
Landscape types.
GRFBug
Encountered GRF bugs.
Information about GRF, used in the game and (part of it) in savegames.
Basic data to distinguish a GRF.
Information about the presence of a Grf at a certain point during gamelog history Note about missing ...
bool was_missing
Grf was missing during some gameload in the past.
const GRFConfig * gc
GRFConfig, if known.
Contains information about one logged action that caused at least one logged change.
uint64_t tick
Tick when it happened.
std::vector< std::unique_ptr< LoggedChange > > change
Logged changes in this action.
GamelogActionType at
Type of action.
uint64_t data
additional data
uint32_t grfid
ID of problematic GRF.
uint32_t grfid
ID of moved GRF.
int32_t offset
offset, positive = move down
uint32_t grfid
ID of GRF with changed parameters.
uint32_t grfid
ID of removed GRF.
LandscapeType landscape
landscape (temperate, arctic, ...)
uint8_t mode
new game mode - Editor x Game
uint32_t type
type of savegame,
uint32_t version
major and minor version OR ttdp version
std::string text
revision string, _openttd_revision
uint16_t slver
_sl_version
uint32_t newgrf
_openttd_newgrf_version
std::string name
name of the setting