src/console_cmds.c
branchcustombridgeheads
changeset 5648 1608018c5ff2
parent 5643 3778051e8095
equal deleted inserted replaced
5647:cbde85c8c878 5648:1608018c5ff2
   197 		}
   197 		}
   198 		return true;
   198 		return true;
   199 	}
   199 	}
   200 
   200 
   201 	return false;
   201 	return false;
       
   202 }
       
   203 
       
   204 /* Explicitly save the configuration */
       
   205 DEF_CONSOLE_CMD(ConSaveConfig)
       
   206 {
       
   207 	if (argc == 0) {
       
   208 		IConsoleHelp("Saves the current config, typically to 'openttd.cfg'.");
       
   209 		return true;
       
   210 	}
       
   211 
       
   212 	SaveToConfig();
       
   213 	IConsolePrint(_icolour_def, "Saved config.");
       
   214 	return true;
   202 }
   215 }
   203 
   216 
   204 static const FiosItem* GetFiosItem(const char* file)
   217 static const FiosItem* GetFiosItem(const char* file)
   205 {
   218 {
   206 	int i;
   219 	int i;
  1473 	IConsoleCmdRegister("scrollto",     ConScrollToTile);
  1486 	IConsoleCmdRegister("scrollto",     ConScrollToTile);
  1474 	IConsoleCmdRegister("alias",        ConAlias);
  1487 	IConsoleCmdRegister("alias",        ConAlias);
  1475 	IConsoleCmdRegister("load",         ConLoad);
  1488 	IConsoleCmdRegister("load",         ConLoad);
  1476 	IConsoleCmdRegister("rm",           ConRemove);
  1489 	IConsoleCmdRegister("rm",           ConRemove);
  1477 	IConsoleCmdRegister("save",         ConSave);
  1490 	IConsoleCmdRegister("save",         ConSave);
       
  1491 	IConsoleCmdRegister("saveconfig",   ConSaveConfig);
  1478 	IConsoleCmdRegister("ls",           ConListFiles);
  1492 	IConsoleCmdRegister("ls",           ConListFiles);
  1479 	IConsoleCmdRegister("cd",           ConChangeDirectory);
  1493 	IConsoleCmdRegister("cd",           ConChangeDirectory);
  1480 	IConsoleCmdRegister("pwd",          ConPrintWorkingDirectory);
  1494 	IConsoleCmdRegister("pwd",          ConPrintWorkingDirectory);
  1481 	IConsoleCmdRegister("clear",        ConClearBuffer);
  1495 	IConsoleCmdRegister("clear",        ConClearBuffer);
  1482 	IConsoleCmdRegister("patch",        ConPatch);
  1496 	IConsoleCmdRegister("patch",        ConPatch);