mirror of https://github.com/OpenTTD/OpenTTD
(svn r20344) -Feature: add rescan_newgrf console command
parent
0664955db7
commit
e2d706cd21
|
@ -1163,6 +1163,19 @@ DEF_CONSOLE_CMD(ConRescanAI)
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_AI */
|
#endif /* ENABLE_AI */
|
||||||
|
|
||||||
|
DEF_CONSOLE_CMD(ConRescanNewGRF)
|
||||||
|
{
|
||||||
|
if (argc == 0) {
|
||||||
|
IConsoleHelp("Rescan the data dir for NewGRFs. Usage: 'rescan_newgrf'");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ScanNewGRFFiles();
|
||||||
|
InvalidateWindowData(WC_GAME_OPTIONS, 0, 1);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
DEF_CONSOLE_CMD(ConGetSeed)
|
DEF_CONSOLE_CMD(ConGetSeed)
|
||||||
{
|
{
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
|
@ -1744,6 +1757,7 @@ void IConsoleStdLibRegister()
|
||||||
IConsoleCmdRegister("setting_newgame", ConSettingNewgame);
|
IConsoleCmdRegister("setting_newgame", ConSettingNewgame);
|
||||||
IConsoleCmdRegister("list_settings",ConListSettings);
|
IConsoleCmdRegister("list_settings",ConListSettings);
|
||||||
IConsoleCmdRegister("gamelog", ConGamelogPrint);
|
IConsoleCmdRegister("gamelog", ConGamelogPrint);
|
||||||
|
IConsoleCmdRegister("rescan_newgrf", ConRescanNewGRF);
|
||||||
|
|
||||||
IConsoleAliasRegister("dir", "ls");
|
IConsoleAliasRegister("dir", "ls");
|
||||||
IConsoleAliasRegister("del", "rm %+");
|
IConsoleAliasRegister("del", "rm %+");
|
||||||
|
|
Loading…
Reference in New Issue