mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
(svn r21248) -Codechange: don't run the tar scanner twice upon startup
This commit is contained in:
parent
f7b2a87292
commit
ed04bef953
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
void AIScanner::RescanAIDir()
|
void AIScanner::RescanAIDir()
|
||||||
{
|
{
|
||||||
TarScanner::DoScan();
|
|
||||||
this->ScanScriptDir("info.nut", AI_DIR);
|
this->ScanScriptDir("info.nut", AI_DIR);
|
||||||
this->ScanScriptDir("library.nut", AI_LIBRARY_DIR);
|
this->ScanScriptDir("library.nut", AI_LIBRARY_DIR);
|
||||||
}
|
}
|
||||||
|
@ -1157,6 +1157,7 @@ DEF_CONSOLE_CMD(ConRescanAI)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TarScanner::DoScan();
|
||||||
AI::Rescan();
|
AI::Rescan();
|
||||||
InvalidateWindowData(WC_AI_LIST, 0, 1);
|
InvalidateWindowData(WC_AI_LIST, 0, 1);
|
||||||
|
|
||||||
@ -1171,6 +1172,7 @@ DEF_CONSOLE_CMD(ConRescanNewGRF)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TarScanner::DoScan();
|
||||||
ScanNewGRFFiles();
|
ScanNewGRFFiles();
|
||||||
InvalidateWindowData(WC_GAME_OPTIONS, 0, 1);
|
InvalidateWindowData(WC_GAME_OPTIONS, 0, 1);
|
||||||
|
|
||||||
|
@ -87,6 +87,8 @@ public:
|
|||||||
/** Free whatever we've allocated */
|
/** Free whatever we've allocated */
|
||||||
~NetworkContentDownloadStatusWindow()
|
~NetworkContentDownloadStatusWindow()
|
||||||
{
|
{
|
||||||
|
TarScanner::DoScan();
|
||||||
|
|
||||||
/* Tell all the backends about what we've downloaded */
|
/* Tell all the backends about what we've downloaded */
|
||||||
for (ContentType *iter = this->receivedTypes.Begin(); iter != this->receivedTypes.End(); iter++) {
|
for (ContentType *iter = this->receivedTypes.Begin(); iter != this->receivedTypes.End(); iter++) {
|
||||||
switch (*iter) {
|
switch (*iter) {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "querystring_gui.h"
|
#include "querystring_gui.h"
|
||||||
#include "core/geometry_func.hpp"
|
#include "core/geometry_func.hpp"
|
||||||
#include "newgrf_text.h"
|
#include "newgrf_text.h"
|
||||||
|
#include "fileio_func.h"
|
||||||
|
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
#include "table/sprites.h"
|
#include "table/sprites.h"
|
||||||
@ -977,6 +978,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
|
|||||||
|
|
||||||
case SNGRFS_RESCAN_FILES:
|
case SNGRFS_RESCAN_FILES:
|
||||||
case SNGRFS_RESCAN_FILES2:
|
case SNGRFS_RESCAN_FILES2:
|
||||||
|
TarScanner::DoScan();
|
||||||
ScanNewGRFFiles();
|
ScanNewGRFFiles();
|
||||||
this->avail_sel = NULL;
|
this->avail_sel = NULL;
|
||||||
this->avail_pos = -1;
|
this->avail_pos = -1;
|
||||||
|
@ -202,6 +202,7 @@ static void ShowHelp()
|
|||||||
p = BlitterFactoryBase::GetBlittersInfo(p, lastof(buf));
|
p = BlitterFactoryBase::GetBlittersInfo(p, lastof(buf));
|
||||||
|
|
||||||
/* We need to initialize the AI, so it finds the AIs */
|
/* We need to initialize the AI, so it finds the AIs */
|
||||||
|
TarScanner::DoScan();
|
||||||
AI::Initialize();
|
AI::Initialize();
|
||||||
p = AI::GetConsoleList(p, lastof(buf));
|
p = AI::GetConsoleList(p, lastof(buf));
|
||||||
AI::Uninitialize(true);
|
AI::Uninitialize(true);
|
||||||
@ -572,6 +573,7 @@ int ttd_main(int argc, char *argv[])
|
|||||||
if (_dedicated_forks) DedicatedFork();
|
if (_dedicated_forks) DedicatedFork();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
TarScanner::DoScan();
|
||||||
AI::Initialize();
|
AI::Initialize();
|
||||||
LoadFromConfig();
|
LoadFromConfig();
|
||||||
AI::Uninitialize(true);
|
AI::Uninitialize(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user