- only show the mod center download button if the item is located in the mode center

This commit is contained in:
Mark Vejvoda 2012-10-15 22:41:26 +00:00
parent feda398d5d
commit fa0551c175
1 changed files with 28 additions and 0 deletions

View File

@ -3938,6 +3938,15 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings,
char szBuf[1024]="";
sprintf(szBuf,"%s %s ?",lang.get("DownloadMissingTilesetQuestion").c_str(),gameSettings->getTileset().c_str());
// Is the item in the mod center?
if(tilesetCacheList.find(getMissingMapFromFTPServer) == tilesetCacheList.end()) {
ftpMessageBox.init(lang.get("Yes"),lang.get("NoDownload"));
}
else {
ftpMessageBox.init(lang.get("ModCenter"),lang.get("GameHost"));
ftpMessageBox.addButton(lang.get("NoDownload"));
}
ftpMissingDataType = ftpmsg_MissingTileset;
showFTPMessageBox(szBuf, lang.get("Question"), false);
}
@ -4001,6 +4010,15 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings,
char szBuf[1024]="";
sprintf(szBuf,"%s %s ?",lang.get("DownloadMissingTechtreeQuestion").c_str(),gameSettings->getTech().c_str());
// Is the item in the mod center?
if(techCacheList.find(getMissingTechtreeFromFTPServer) == techCacheList.end()) {
ftpMessageBox.init(lang.get("Yes"),lang.get("NoDownload"));
}
else {
ftpMessageBox.init(lang.get("ModCenter"),lang.get("GameHost"));
ftpMessageBox.addButton(lang.get("NoDownload"));
}
ftpMissingDataType = ftpmsg_MissingTechtree;
showFTPMessageBox(szBuf, lang.get("Question"), false);
}
@ -4078,6 +4096,16 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings,
char szBuf[1024]="";
sprintf(szBuf,"%s %s ?",lang.get("DownloadMissingMapQuestion").c_str(),currentMap.c_str());
// Is the item in the mod center?
if(mapCacheList.find(getMissingTechtreeFromFTPServer) == mapCacheList.end()) {
ftpMessageBox.init(lang.get("Yes"),lang.get("NoDownload"));
}
else {
ftpMessageBox.init(lang.get("ModCenter"),lang.get("GameHost"));
ftpMessageBox.addButton(lang.get("NoDownload"));
}
ftpMissingDataType = ftpmsg_MissingMap;
showFTPMessageBox(szBuf, lang.get("Question"), false);
}