Fixed: #1074 sheets_packer using default static relative paths

This commit is contained in:
kervala 2010-08-27 16:48:44 +02:00
parent c4a54d8934
commit 03d3c5ebcf
3 changed files with 11 additions and 1 deletions

View file

@ -674,7 +674,7 @@ void CSheetManager::loadAllSheet(NLMISC::IProgressCallback &callBack, bool updat
path.clear();
}
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);
TEntitySheetMap::iterator it = entitySheetContainer.begin();

View file

@ -203,11 +203,20 @@ public:
/// dump all visual slots indexes in a file
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:
typedef std::vector<CItemSheet *> TItemVector;
typedef std::vector<TItemVector> TSlots;
TSlots _VisualSlots;
// directory where to create .packed_sheets
std::string _OutputDataPath;
protected:

View file

@ -92,6 +92,7 @@ bool init()
// load packed sheets
nlinfo("Loading sheets...");
IProgressCallback callback;
SheetMngr.setOutputDataPath(AppCfg.OutputDataPath);
SheetMngr.load (callback, true, true);
// Make the lmconts.packed file