(svn r7801) -Feature: add command line option to prevent saving of highscore and configuration on exit and a console command to manually initiate a configuration save (Aloysha).
This commit is contained in:
@@ -201,6 +201,19 @@ DEF_CONSOLE_CMD(ConSave)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Explicitly save the configuration */
|
||||
DEF_CONSOLE_CMD(ConSaveConfig)
|
||||
{
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Saves the current config, typically to 'openttd.cfg'.");
|
||||
return true;
|
||||
}
|
||||
|
||||
SaveToConfig();
|
||||
IConsolePrint(_icolour_def, "Saved config.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static const FiosItem* GetFiosItem(const char* file)
|
||||
{
|
||||
int i;
|
||||
@@ -1475,6 +1488,7 @@ void IConsoleStdLibRegister(void)
|
||||
IConsoleCmdRegister("load", ConLoad);
|
||||
IConsoleCmdRegister("rm", ConRemove);
|
||||
IConsoleCmdRegister("save", ConSave);
|
||||
IConsoleCmdRegister("saveconfig", ConSaveConfig);
|
||||
IConsoleCmdRegister("ls", ConListFiles);
|
||||
IConsoleCmdRegister("cd", ConChangeDirectory);
|
||||
IConsoleCmdRegister("pwd", ConPrintWorkingDirectory);
|
||||
|
||||
Reference in New Issue
Block a user