Feature: Persistant rotation of numbered auto/netsave after restart (#9397)

It was always starting from 0 on openttd restart.
Now the most recent auto/netsave number will be used as a base to generate the next filename.
This commit is contained in:
Loïc Guilloux
2021-07-17 12:48:35 +02:00
committed by GitHub
parent 16abdd5254
commit 460991ecf4
6 changed files with 77 additions and 18 deletions

View File

@@ -125,4 +125,16 @@ std::string FiosMakeSavegameName(const char *name);
FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const std::string &file, const char *ext, char *title, const char *last);
/**
* A savegame name automatically numbered.
*/
struct FiosNumberedSaveName {
FiosNumberedSaveName(const std::string &prefix);
std::string Filename();
std::string Extension();
private:
std::string prefix;
int number;
};
#endif /* FIOS_H */