1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

(svn r23217) -Codechange: introduce the concept of scanning only in a limited set of sub directories

This commit is contained in:
rubidium
2011-11-14 21:30:37 +00:00
parent 160294ff22
commit 6d991b3b10
7 changed files with 60 additions and 16 deletions

View File

@@ -86,7 +86,35 @@ public:
/** Free whatever we've allocated */
~NetworkContentDownloadStatusWindow()
{
TarScanner::DoScan();
TarScanner::Mode mode = TarScanner::NONE;
for (ContentType *iter = this->receivedTypes.Begin(); iter != this->receivedTypes.End(); iter++) {
switch (*iter) {
case CONTENT_TYPE_AI:
case CONTENT_TYPE_AI_LIBRARY:
mode |= TarScanner::AI;
break;
case CONTENT_TYPE_BASE_GRAPHICS:
case CONTENT_TYPE_BASE_SOUNDS:
case CONTENT_TYPE_BASE_MUSIC:
mode |= TarScanner::BASESET;
break;
case CONTENT_TYPE_NEWGRF:
mode |= TarScanner::NEWGRF;
break;
case CONTENT_TYPE_SCENARIO:
case CONTENT_TYPE_HEIGHTMAP:
mode |= TarScanner::SCENARIO;
break;
default:
break;
}
}
TarScanner::DoScan(mode);
/* Tell all the backends about what we've downloaded */
for (ContentType *iter = this->receivedTypes.Begin(); iter != this->receivedTypes.End(); iter++) {