mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
21 lines
707 B
C++
21 lines
707 B
C++
|
|
#include "mandatoryid.hpp"
|
|
|
|
#include "../world/idcollection.hpp"
|
|
|
|
CSMTools::MandatoryIdStage::MandatoryIdStage (const CSMWorld::IdCollectionBase& idCollection,
|
|
const CSMWorld::UniversalId& collectionId, const std::vector<std::string>& ids)
|
|
: mIdCollection (idCollection), mCollectionId (collectionId), mIds (ids)
|
|
{}
|
|
|
|
int CSMTools::MandatoryIdStage::setup()
|
|
{
|
|
return mIds.size();
|
|
}
|
|
|
|
void CSMTools::MandatoryIdStage::perform (int stage, std::vector<std::string>& messages)
|
|
{
|
|
if (mIdCollection.searchId (mIds.at (stage))==-1 ||
|
|
mIdCollection.getRecord (mIds.at (stage)).isDeleted())
|
|
messages.push_back (mCollectionId.toString() + "|Missing mandatory record: " + mIds.at (stage));
|
|
} |