- slight change in loading factiontype (load by folder names not *. to avoid errors when garbage files exist)
This commit is contained in:
parent
8bbf398e70
commit
4e4825d752
|
@ -56,9 +56,12 @@ void FactionType::load(const string &dir, const TechTree *techTree, Checksum* ch
|
||||||
|
|
||||||
if(personalityType == fpt_Normal) {
|
if(personalityType == fpt_Normal) {
|
||||||
// a1) preload units
|
// a1) preload units
|
||||||
string unitsPath= currentPath + "units/*.";
|
//string unitsPath= currentPath + "units/*.";
|
||||||
|
string unitsPath= currentPath + "units/";
|
||||||
vector<string> unitFilenames;
|
vector<string> unitFilenames;
|
||||||
findAll(unitsPath, unitFilenames);
|
//findAll(unitsPath, unitFilenames);
|
||||||
|
findDirs(unitsPath, unitFilenames,false,false);
|
||||||
|
|
||||||
unitTypes.resize(unitFilenames.size());
|
unitTypes.resize(unitFilenames.size());
|
||||||
|
|
||||||
for(int i = 0; i < unitTypes.size(); ++i) {
|
for(int i = 0; i < unitTypes.size(); ++i) {
|
||||||
|
@ -69,9 +72,12 @@ void FactionType::load(const string &dir, const TechTree *techTree, Checksum* ch
|
||||||
}
|
}
|
||||||
|
|
||||||
// a2) preload upgrades
|
// a2) preload upgrades
|
||||||
string upgradesPath= currentPath + "upgrades/*.";
|
//string upgradesPath= currentPath + "upgrades/*.";
|
||||||
|
string upgradesPath= currentPath + "upgrades/";
|
||||||
vector<string> upgradeFilenames;
|
vector<string> upgradeFilenames;
|
||||||
findAll(upgradesPath, upgradeFilenames, false, false);
|
//findAll(upgradesPath, upgradeFilenames, false, false);
|
||||||
|
findDirs(upgradesPath, upgradeFilenames,false,false);
|
||||||
|
|
||||||
upgradeTypes.resize(upgradeFilenames.size());
|
upgradeTypes.resize(upgradeFilenames.size());
|
||||||
for(int i = 0; i < upgradeTypes.size(); ++i) {
|
for(int i = 0; i < upgradeTypes.size(); ++i) {
|
||||||
string str= currentPath + "upgrades/" + upgradeFilenames[i];
|
string str= currentPath + "upgrades/" + upgradeFilenames[i];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user