- fix invalid report of missing files of the linked faction xml when using linked factions

This commit is contained in:
Mark Vejvoda 2012-10-14 21:59:35 +00:00
parent 68b1ae54b5
commit 4a972c9499
2 changed files with 12 additions and 4 deletions

View File

@ -1368,7 +1368,7 @@ void runTilesetValidationForPath(string tilesetPath, string tilesetName,
if(loadedFileList.find(foundFile) == loadedFileList.end()) {
if(foundUnusedFile == false) {
printf("\nWarning, unused files were detected - START:\n=====================\n");
printf("\nLine ref: %d, Warning, unused files were detected - START:\n=====================\n",__LINE__);
}
foundUnusedFile = true;
@ -1402,7 +1402,7 @@ void runTilesetValidationForPath(string tilesetPath, string tilesetName,
if(purgedMegaBytes > 0) {
printf("Purged %.2f MB (%d) in files\n",purgedMegaBytes,purgeCount);
}
printf("\nWarning, unused files were detected - END:\n");
printf("\nLine ref: %d, Warning, unused files were detected - END:\n",__LINE__);
}
if(showDuplicateFiles == true) {
@ -1808,7 +1808,7 @@ void runTechValidationForPath(string techPath, string techName,
if(loadedFileList.find(foundFile) == loadedFileList.end()) {
if(foundUnusedFile == false) {
printf("\nWarning, unused files were detected - START:\n=====================\n");
printf("\nLine ref: %d, Warning, unused files were detected - START:\n=====================\n",__LINE__);
}
foundUnusedFile = true;
@ -1842,7 +1842,7 @@ void runTechValidationForPath(string techPath, string techName,
if(purgedMegaBytes > 0) {
printf("Purged %.2f MB (%d) in files\n",purgedMegaBytes,purgeCount);
}
printf("\nWarning, unused files were detected - END:\n");
printf("\nLine ref: %d, Warning, unused files were detected - END:\n",__LINE__);
}
if(showDuplicateFiles == true) {

View File

@ -88,6 +88,14 @@ void FactionType::load(const string &factionName, const TechTree *techTree, Chec
endPathWithSlash(techTreePath);
techTreeName=linkedTechTreeName;
string linkedCurrentPath = techTreePath + "factions/" + factionName;
endPathWithSlash(linkedCurrentPath);
string linkedTmppath= linkedCurrentPath + factionName +".xml";
//printf("linkedTmppath [%s] linkedCurrentPath [%s]\n",linkedTmppath.c_str(),linkedCurrentPath.c_str());
loadedFileList[linkedTmppath].push_back(make_pair(linkedCurrentPath,linkedCurrentPath));
loadedFileList[tmppath].push_back(make_pair(currentPath,currentPath));
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"techTreePath [%s] techTreeName [%s]\n",techTreePath.c_str(),techTreeName.c_str());
}
else {