mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
moved code for creating new base content records into the Document class
This commit is contained in:
parent
4c973a0f67
commit
ba0d13fc12
2 changed files with 13 additions and 20 deletions
|
@ -22,7 +22,6 @@ void CS::Editor::createDocument()
|
|||
mStartup.hide();
|
||||
|
||||
/// \todo open the ESX picker instead
|
||||
/// \todo move the following code for creating initial records into the document manager
|
||||
|
||||
std::ostringstream stream;
|
||||
|
||||
|
@ -33,22 +32,6 @@ void CS::Editor::createDocument()
|
|||
|
||||
CSMDoc::Document *document = mDocumentManager.addDocument (files, true);
|
||||
|
||||
static const char *sGlobals[] =
|
||||
{
|
||||
"Day", "DaysPassed", "GameHour", "Month", "PCRace", "PCVampire", "PCWerewolf", "PCYear", 0
|
||||
};
|
||||
|
||||
for (int i=0; sGlobals[i]; ++i)
|
||||
{
|
||||
ESM::Global record;
|
||||
record.mId = sGlobals[i];
|
||||
record.mValue = i==0 ? 1 : 0;
|
||||
record.mType = ESM::VT_Float;
|
||||
document->getData().getGlobals().add (record);
|
||||
}
|
||||
|
||||
document->getData().merge(); /// \todo remove once proper ESX loading is implemented
|
||||
|
||||
mViewManager.addView (document);
|
||||
}
|
||||
|
||||
|
@ -57,7 +40,7 @@ void CS::Editor::loadDocument()
|
|||
mStartup.hide();
|
||||
|
||||
/// \todo open the ESX picker instead
|
||||
/// \todo replace the manual record creation and load the ESX files instead
|
||||
/// \todo remove the manual record creation and load the ESX files instead
|
||||
|
||||
std::ostringstream stream;
|
||||
|
||||
|
|
|
@ -14,9 +14,19 @@ void CSMDoc::Document::load (const std::vector<boost::filesystem::path>::const_i
|
|||
|
||||
void CSMDoc::Document::createBase()
|
||||
{
|
||||
std::cout << "pretending to create base file records" << std::endl;
|
||||
static const char *sGlobals[] =
|
||||
{
|
||||
"Day", "DaysPassed", "GameHour", "Month", "PCRace", "PCVampire", "PCWerewolf", "PCYear", 0
|
||||
};
|
||||
|
||||
/// \todo create mandatory records for base content file
|
||||
for (int i=0; sGlobals[i]; ++i)
|
||||
{
|
||||
ESM::Global record;
|
||||
record.mId = sGlobals[i];
|
||||
record.mValue = i==0 ? 1 : 0;
|
||||
record.mType = ESM::VT_Float;
|
||||
getData().getGlobals().add (record);
|
||||
}
|
||||
}
|
||||
|
||||
CSMDoc::Document::Document (const std::vector<boost::filesystem::path>& files, bool new_)
|
||||
|
|
Loading…
Reference in a new issue