mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
20da0892ef
Slowly moving through the open-cs errors Good progress in openCS Very good progress on openCS Getting closer with openCS OpenCS compiles and runs! Didn't have time to test it all though ix openMW everything compiles on windows?? Fix gcc Fix Clang
30 lines
861 B
C++
30 lines
861 B
C++
#include "mandatoryid.hpp"
|
|
|
|
#include <memory>
|
|
|
|
#include "../world/collectionbase.hpp"
|
|
|
|
#include "../world/record.hpp"
|
|
|
|
#include <apps/opencs/model/doc/messages.hpp>
|
|
#include <apps/opencs/model/world/universalid.hpp>
|
|
|
|
CSMTools::MandatoryIdStage::MandatoryIdStage(const CSMWorld::CollectionBase& idCollection,
|
|
const CSMWorld::UniversalId& collectionId, const std::vector<ESM::RefId>& ids)
|
|
: mIdCollection(idCollection)
|
|
, mCollectionId(collectionId)
|
|
, mIds(ids)
|
|
{
|
|
}
|
|
|
|
int CSMTools::MandatoryIdStage::setup()
|
|
{
|
|
return static_cast<int>(mIds.size());
|
|
}
|
|
|
|
void CSMTools::MandatoryIdStage::perform(int stage, CSMDoc::Messages& messages)
|
|
{
|
|
if (mIdCollection.searchId(mIds.at(stage)) == -1 || mIdCollection.getRecord(mIds.at(stage)).isDeleted())
|
|
messages.add(mCollectionId, "Missing mandatory record: " + mIds.at(stage).getRefIdString());
|
|
}
|