summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-14 21:30:37 +0000
committerrubidium <rubidium@openttd.org>2011-11-14 21:30:37 +0000
commit6d991b3b10bad798f7e2afce1bc806dbdc3ced4b (patch)
tree49c462606a07d3243d66abb82b7467204753b705 /src/network
parent160294ff22a2b30fc75be1977117eac6910bdd82 (diff)
downloadopenttd-6d991b3b10bad798f7e2afce1bc806dbdc3ced4b.tar.xz
(svn r23217) -Codechange: introduce the concept of scanning only in a limited set of sub directories
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_content_gui.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index ed293f2cd..782f3d52c 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -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++) {