diff options
author | rubidium <rubidium@openttd.org> | 2010-02-26 00:00:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-02-26 00:00:55 +0000 |
commit | 0f6d82df7ea06a2c93d4bd07c8fd28b520c72f35 (patch) | |
tree | d60da48166898b9f217ed1141a0ec9807a568fe7 /src/network | |
parent | 7b1e0a4b67985cbd679fa74493f50320cc08c701 (diff) | |
download | openttd-0f6d82df7ea06a2c93d4bd07c8fd28b520c72f35.tar.xz |
(svn r19262) -Feature: finalise BaNaNaS support for music sets
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_content.cpp | 6 | ||||
-rw-r--r-- | src/network/network_content_gui.cpp | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index d5ed2a374..76576f2c2 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -481,6 +481,12 @@ void ClientNetworkContentSocketHandler::AfterDownload() TarListAddFile(GetFullFilename(this->curInfo, false)); + if (this->curInfo->type == CONTENT_TYPE_BASE_MUSIC) { + /* Music can't be in a tar. So extract the tar! */ + ExtractTar(GetFullFilename(this->curInfo, false)); + unlink(GetFullFilename(this->curInfo, false)); + } + this->OnDownloadComplete(this->curInfo->id); } else { ShowErrorMessage(STR_CONTENT_ERROR_COULD_NOT_EXTRACT, INVALID_STRING_ID, WL_ERROR); diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index a25a5ad4a..8f377a0ba 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -106,6 +106,11 @@ public: SetWindowDirty(WC_GAME_OPTIONS, 0); break; + case CONTENT_TYPE_BASE_MUSIC: + BaseMusic::FindSets(); + SetWindowDirty(WC_GAME_OPTIONS, 0); + break; + case CONTENT_TYPE_NEWGRF: ScanNewGRFFiles(); /* Yes... these are the NewGRF windows */ |