MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Filename

Method Filename

src/fios.cpp:738–742  ·  view source on GitHub ↗

* Generate a savegame name and number according to _settings_client.gui.max_num_autosaves. * @return A filename in format " .sav". */

Source from the content-addressed store, hash-verified

736 * @return A filename in format "<prefix><number>.sav".
737 */
738std::string FiosNumberedSaveName::Filename()
739{
740 if (++this->number >= _settings_client.gui.max_num_autosaves) this->number = 0;
741 return fmt::format("{}{}.sav", this->prefix, this->number);
742}
743
744/**
745 * Generate an extension for a savegame name.

Callers 1

DoAutoOrNetsaveFunction · 0.80

Calls 1

formatFunction · 0.50

Tested by

no test coverage detected