mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 13:01:42 +00:00
Fixed: Remove some hardcoded paths and replaced them by LeveldesignDataPath variable
--HG-- branch : develop
This commit is contained in:
parent
57f216dc3e
commit
3bb45d4f2b
1 changed files with 9 additions and 6 deletions
|
@ -356,6 +356,7 @@ int extractNewSheetNames(int argc, char *argv[])
|
|||
CConfigFile::CVar &paths = cf.getVar("Paths");
|
||||
CConfigFile::CVar &pathNoRecurse= cf.getVar("PathsNoRecurse");
|
||||
CConfigFile::CVar &ligoClassFile= cf.getVar("LigoClassFile");
|
||||
CConfigFile::CVar &leveldesignDataPathVar = cf.getVar("LeveldesignDataPath");
|
||||
|
||||
// parse path
|
||||
for (uint i=0; i<paths.size(); ++i)
|
||||
|
@ -366,6 +367,8 @@ int extractNewSheetNames(int argc, char *argv[])
|
|||
{
|
||||
CPath::addSearchPath(NLMISC::expandEnvironmentVariables(pathNoRecurse.asString(i)), false, false);
|
||||
}
|
||||
|
||||
std::string leveldesignDataPath = NLMISC::expandEnvironmentVariables(leveldesignDataPathVar.asString());
|
||||
|
||||
// init ligo config once
|
||||
string ligoPath = CPath::lookup(NLMISC::expandEnvironmentVariables(ligoClassFile.asString()), true, true);
|
||||
|
@ -382,10 +385,10 @@ int extractNewSheetNames(int argc, char *argv[])
|
|||
// 2nd is the Key column identifier.
|
||||
// 3rd is the sheet extension
|
||||
// 4th is the directory where to find new sheets
|
||||
"work/item_words_wk.txt", "item ID", "sitem", "l:/leveldesign/game_element/sitem",
|
||||
"work/creature_words_wk.txt", "creature ID", "creature", "l:/leveldesign/game_elem/creature/fauna", // take fauna only because other are special
|
||||
"work/sbrick_words_wk.txt", "sbrick ID", "sbrick", "l:/leveldesign/game_element/sbrick",
|
||||
"work/sphrase_words_wk.txt", "sphrase ID", "sphrase", "l:/leveldesign/game_element/sphrase",
|
||||
"work/item_words_wk.txt", "item ID", "sitem", "leveldesign/game_element/sitem",
|
||||
"work/creature_words_wk.txt", "creature ID", "creature", "leveldesign/game_elem/creature/fauna", // take fauna only because other are special
|
||||
"work/sbrick_words_wk.txt", "sbrick ID", "sbrick", "leveldesign/game_element/sbrick",
|
||||
"work/sphrase_words_wk.txt", "sphrase ID", "sphrase", "leveldesign/game_element/sphrase",
|
||||
};
|
||||
uint numSheetDefs= sizeof(sheetDefs) / (4*sizeof(sheetDefs[0]));
|
||||
|
||||
|
@ -394,7 +397,7 @@ int extractNewSheetNames(int argc, char *argv[])
|
|||
{
|
||||
CSheetWordListBuilder builder;
|
||||
builder.SheetExt= sheetDefs[i*4+2];
|
||||
builder.SheetPath= sheetDefs[i*4+3];
|
||||
builder.SheetPath= CPath::standardizePath(leveldesignDataPath) + sheetDefs[i*4+3];
|
||||
extractNewWords(sheetDefs[i*4+0], sheetDefs[i*4+1], builder);
|
||||
}
|
||||
|
||||
|
@ -403,7 +406,7 @@ int extractNewSheetNames(int argc, char *argv[])
|
|||
{
|
||||
// build place names
|
||||
CRegionPrimWordListBuilder builder;
|
||||
builder.PrimPath= "l:/primitives";
|
||||
builder.PrimPath= leveldesignDataPath;
|
||||
builder.PrimFilter.push_back("region_*.primitive");
|
||||
builder.PrimFilter.push_back("indoors_*.primitive");
|
||||
extractNewWords("work/place_words_wk.txt", "placeId", builder);
|
||||
|
|
Loading…
Reference in a new issue