OpenTTD Source 20241224-master-gf74b0cf984
|
A savegame name automatically numbered. More...
#include <fios.h>
Public Member Functions | |
FiosNumberedSaveName (const std::string &prefix) | |
Constructs FiosNumberedSaveName. | |
std::string | Filename () |
Generate a savegame name and number according to _settings_client.gui.max_num_autosaves. | |
std::string | Extension () |
Generate an extension for a savegame name. | |
Private Attributes | |
std::string | prefix |
int | number |
FiosNumberedSaveName::FiosNumberedSaveName | ( | const std::string & | prefix | ) |
Constructs FiosNumberedSaveName.
Initial number is the most recent save, or -1 if not found.
prefix | The prefix to use to generate a filename. |
< Static as the lambda needs access to it.
Definition at line 727 of file fios.cpp.
References AUTOSAVE_DIR, FileScanner::Scan(), SLO_SAVE, and StrEqualsIgnoreCase().
std::string FiosNumberedSaveName::Extension | ( | ) |
Generate an extension for a savegame name.
Definition at line 774 of file fios.cpp.
Referenced by DoAutoOrNetsave().
std::string FiosNumberedSaveName::Filename | ( | ) |
Generate a savegame name and number according to _settings_client.gui.max_num_autosaves.
Definition at line 764 of file fios.cpp.
References _settings_client, ClientSettings::gui, and GUISettings::max_num_autosaves.
Referenced by DoAutoOrNetsave().