some minor bugfixes (proper variable init, added validation error message)
This commit is contained in:
parent
aa1efb5d3a
commit
1dd1b8febb
|
@ -3110,7 +3110,7 @@ void runTilesetValidationReport(int argc, char** argv) {
|
||||||
double purgedMegaBytes=0;
|
double purgedMegaBytes=0;
|
||||||
bool showDuplicateFiles = true;
|
bool showDuplicateFiles = true;
|
||||||
|
|
||||||
//std::vector<string> filteredFactionList;
|
bool tilesetFound = false;
|
||||||
|
|
||||||
vector<string> tilesetPaths = config.getPathListForType(ptTilesets);
|
vector<string> tilesetPaths = config.getPathListForType(ptTilesets);
|
||||||
for(int idx = 0; idx < tilesetPaths.size(); idx++) {
|
for(int idx = 0; idx < tilesetPaths.size(); idx++) {
|
||||||
|
@ -3122,6 +3122,7 @@ void runTilesetValidationReport(int argc, char** argv) {
|
||||||
for(int idx2 = 0; idx2 < tilesetList.size(); idx2++) {
|
for(int idx2 = 0; idx2 < tilesetList.size(); idx2++) {
|
||||||
string &tilesetName = tilesetList[idx2];
|
string &tilesetName = tilesetList[idx2];
|
||||||
if(tilesetName == validateTilesetName) {
|
if(tilesetName == validateTilesetName) {
|
||||||
|
tilesetFound = true;
|
||||||
runTilesetValidationForPath(tilesetPath, tilesetName,
|
runTilesetValidationForPath(tilesetPath, tilesetName,
|
||||||
world, purgeUnusedFiles, showDuplicateFiles,
|
world, purgeUnusedFiles, showDuplicateFiles,
|
||||||
false, false, purgedMegaBytes);
|
false, false, purgedMegaBytes);
|
||||||
|
@ -3129,6 +3130,9 @@ void runTilesetValidationReport(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(tilesetFound == false) {
|
||||||
|
printf("*ERROR The specified tileset [%s] was NOT FOUND!\n",validateTilesetName.c_str());
|
||||||
|
}
|
||||||
printf("\n====== Finished Validation ======\n");
|
printf("\n====== Finished Validation ======\n");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -97,9 +97,9 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
||||||
lastCheckedCRCTilesetName = "";
|
lastCheckedCRCTilesetName = "";
|
||||||
lastCheckedCRCTechtreeName = "";
|
lastCheckedCRCTechtreeName = "";
|
||||||
lastCheckedCRCMapName = "";
|
lastCheckedCRCMapName = "";
|
||||||
lastCheckedCRCTilesetValue = -1;
|
lastCheckedCRCTilesetValue = 0;
|
||||||
lastCheckedCRCTechtreeValue = -1;
|
lastCheckedCRCTechtreeValue = 0;
|
||||||
lastCheckedCRCMapValue = -1;
|
lastCheckedCRCMapValue = 0;
|
||||||
|
|
||||||
mapPreviewTexture=NULL;
|
mapPreviewTexture=NULL;
|
||||||
currentFactionLogo = "";
|
currentFactionLogo = "";
|
||||||
|
|
|
@ -110,9 +110,9 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
||||||
last_Forced_CheckedCRCTechtreeName = "";
|
last_Forced_CheckedCRCTechtreeName = "";
|
||||||
last_Forced_CheckedCRCMapName = "";
|
last_Forced_CheckedCRCMapName = "";
|
||||||
|
|
||||||
lastCheckedCRCTilesetValue = -1;
|
lastCheckedCRCTilesetValue = 0;
|
||||||
lastCheckedCRCTechtreeValue = -1;
|
lastCheckedCRCTechtreeValue = 0;
|
||||||
lastCheckedCRCMapValue = -1;
|
lastCheckedCRCMapValue = 0;
|
||||||
|
|
||||||
publishToMasterserverThread = NULL;
|
publishToMasterserverThread = NULL;
|
||||||
publishToClientsThread = NULL;
|
publishToClientsThread = NULL;
|
||||||
|
|
|
@ -843,14 +843,6 @@ void MenuStateMods::getTechsLocalList() {
|
||||||
string path = config.getPathListForType(ptTechs)[1];
|
string path = config.getPathListForType(ptTechs)[1];
|
||||||
endPathWithSlash(path);
|
endPathWithSlash(path);
|
||||||
findDirs(path, techTreeFilesUserData, false, false);
|
findDirs(path, techTreeFilesUserData, false, false);
|
||||||
|
|
||||||
//for(unsigned int i = 0; i < techTreeFilesUserData.size(); ++i) {
|
|
||||||
//string itemPath = config.getPathListForType(ptTechs,"")[1] + "/" + techTreeFilesUserData[i] + string("/*");
|
|
||||||
//bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
|
||||||
//mapCRCUpdateList[itemPath] = getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL,forceRefresh);
|
|
||||||
//mapCRCUpdateList[itemPath] = getFolderTreeContentsCheckSumRecursively(itemPath, "", NULL,false);
|
|
||||||
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] local CRC for techtree [%s] is [%d]\n",__FILE__,__FUNCTION__,__LINE__,itemPath.c_str(),mapCRCUpdateList[itemPath]);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ private:
|
||||||
void loadMapPreview(string name);
|
void loadMapPreview(string name);
|
||||||
void showRemoteDesription(ModInfo *modInfo);
|
void showRemoteDesription(ModInfo *modInfo);
|
||||||
|
|
||||||
std::map<string,uint32> mapCRCUpdateList;
|
std::map<string,bool> mapCRCUpdateList;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MenuStateMods(Program *program, MainMenu *mainMenu);
|
MenuStateMods(Program *program, MainMenu *mainMenu);
|
||||||
|
|
Loading…
Reference in New Issue