Fixed: #1074 sheets_packer using default static relative paths
This commit is contained in:
parent
c21199466d
commit
440084d5da
3 changed files with 11 additions and 1 deletions
|
@ -674,7 +674,7 @@ void CSheetManager::loadAllSheet(NLMISC::IProgressCallback &callBack, bool updat
|
||||||
path.clear();
|
path.clear();
|
||||||
}
|
}
|
||||||
if(path.empty())
|
if(path.empty())
|
||||||
path = "../../client/data/" + TypeVersion[i].Type + ".packed_sheets";
|
path = CPath::standardizePath(_OutputDataPath) + TypeVersion[i].Type + ".packed_sheets";
|
||||||
::loadForm(extensions, path, entitySheetContainer, updatePackedSheet);
|
::loadForm(extensions, path, entitySheetContainer, updatePackedSheet);
|
||||||
|
|
||||||
TEntitySheetMap::iterator it = entitySheetContainer.begin();
|
TEntitySheetMap::iterator it = entitySheetContainer.begin();
|
||||||
|
|
|
@ -203,11 +203,20 @@ public:
|
||||||
/// dump all visual slots indexes in a file
|
/// dump all visual slots indexes in a file
|
||||||
void dumpVisualSlotsIndex();
|
void dumpVisualSlotsIndex();
|
||||||
|
|
||||||
|
/// Set output data path
|
||||||
|
void setOutputDataPath(const std::string &dataPath) { _OutputDataPath = dataPath; }
|
||||||
|
|
||||||
|
/// Return output data path
|
||||||
|
const std::string& getOutputDataPath() const { return _OutputDataPath; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<CItemSheet *> TItemVector;
|
typedef std::vector<CItemSheet *> TItemVector;
|
||||||
typedef std::vector<TItemVector> TSlots;
|
typedef std::vector<TItemVector> TSlots;
|
||||||
TSlots _VisualSlots;
|
TSlots _VisualSlots;
|
||||||
|
|
||||||
|
// directory where to create .packed_sheets
|
||||||
|
std::string _OutputDataPath;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,7 @@ bool init()
|
||||||
// load packed sheets
|
// load packed sheets
|
||||||
nlinfo("Loading sheets...");
|
nlinfo("Loading sheets...");
|
||||||
IProgressCallback callback;
|
IProgressCallback callback;
|
||||||
|
SheetMngr.setOutputDataPath(AppCfg.OutputDataPath);
|
||||||
SheetMngr.load (callback, true, true);
|
SheetMngr.load (callback, true, true);
|
||||||
|
|
||||||
// Make the lmconts.packed file
|
// Make the lmconts.packed file
|
||||||
|
|
Loading…
Reference in a new issue