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

Function ConSaveConfig

src/console_cmds.cpp:446–457  ·  view source on GitHub ↗

* Explicitly save the configuration. * @return True. */

Source from the content-addressed store, hash-verified

444 * @return True.
445 */
446static bool ConSaveConfig(std::span<std::string_view> argv)
447{
448 if (argv.empty()) {
449 IConsolePrint(CC_HELP, "Saves the configuration for new games to the configuration file, typically 'openttd.cfg'.");
450 IConsolePrint(CC_HELP, "It does not save the configuration of the current game to the configuration file.");
451 return true;
452 }
453
454 SaveToConfig();
455 IConsolePrint(CC_DEFAULT, "Saved config.");
456 return true;
457}
458
459static bool ConLoad(std::span<std::string_view> argv)
460{

Callers

nothing calls this directly

Calls 3

SaveToConfigFunction · 0.85
IConsolePrintFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected