mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 19:49:41 +00:00
ported setting of meta data for saving to the new mechanism
This commit is contained in:
parent
f3ff90e1fd
commit
1870b087e7
3 changed files with 2 additions and 18 deletions
|
@ -53,18 +53,16 @@ void CSMDoc::WriteHeaderStage::perform (int stage, Messages& messages)
|
||||||
|
|
||||||
mState.getWriter().clearMaster();
|
mState.getWriter().clearMaster();
|
||||||
|
|
||||||
mState.getWriter().setFormat (0);
|
|
||||||
|
|
||||||
if (mSimple)
|
if (mSimple)
|
||||||
{
|
{
|
||||||
mState.getWriter().setAuthor ("");
|
mState.getWriter().setAuthor ("");
|
||||||
mState.getWriter().setDescription ("");
|
mState.getWriter().setDescription ("");
|
||||||
mState.getWriter().setRecordCount (0);
|
mState.getWriter().setRecordCount (0);
|
||||||
|
mState.getWriter().setFormat (ESM::Header::CurrentFormat);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mState.getWriter().setAuthor (mDocument.getData().getAuthor());
|
mDocument.getData().getMetaData().save (mState.getWriter());
|
||||||
mState.getWriter().setDescription (mDocument.getData().getDescription());
|
|
||||||
mState.getWriter().setRecordCount (
|
mState.getWriter().setRecordCount (
|
||||||
mDocument.getData().count (CSMWorld::RecordBase::State_Modified) +
|
mDocument.getData().count (CSMWorld::RecordBase::State_Modified) +
|
||||||
mDocument.getData().count (CSMWorld::RecordBase::State_ModifiedOnly) +
|
mDocument.getData().count (CSMWorld::RecordBase::State_ModifiedOnly) +
|
||||||
|
|
|
@ -1114,16 +1114,6 @@ int CSMWorld::Data::count (RecordBase::State state) const
|
||||||
count (state, mPathgrids);
|
count (state, mPathgrids);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CSMWorld::Data::getDescription() const
|
|
||||||
{
|
|
||||||
return mMetaData.getRecord (0).get().mDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string CSMWorld::Data::getAuthor() const
|
|
||||||
{
|
|
||||||
return mMetaData.getRecord (0).get().mAuthor;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> CSMWorld::Data::getIds (bool listDeleted) const
|
std::vector<std::string> CSMWorld::Data::getIds (bool listDeleted) const
|
||||||
{
|
{
|
||||||
std::vector<std::string> ids;
|
std::vector<std::string> ids;
|
||||||
|
|
|
@ -269,10 +269,6 @@ namespace CSMWorld
|
||||||
int count (RecordBase::State state) const;
|
int count (RecordBase::State state) const;
|
||||||
///< Return number of top-level records with the given \a state.
|
///< Return number of top-level records with the given \a state.
|
||||||
|
|
||||||
std::string getDescription() const;
|
|
||||||
|
|
||||||
std::string getAuthor() const;
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void idListChanged();
|
void idListChanged();
|
||||||
|
|
Loading…
Reference in a new issue