2015-08-03 16:08:01 +00:00
|
|
|
#ifndef CSM_TOOLS_MAGICEFFECTCHECK_HPP
|
|
|
|
#define CSM_TOOLS_MAGICEFFECTCHECK_HPP
|
|
|
|
|
2022-10-19 17:02:00 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <apps/opencs/model/world/universalid.hpp>
|
|
|
|
|
2022-01-22 14:58:41 +00:00
|
|
|
#include <components/esm3/loadsoun.hpp>
|
2015-08-03 16:08:01 +00:00
|
|
|
|
|
|
|
#include "../world/idcollection.hpp"
|
|
|
|
|
|
|
|
#include "../doc/stage.hpp"
|
|
|
|
|
2022-10-19 17:02:00 +00:00
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Messages;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
class RefIdCollection;
|
|
|
|
class Resources;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
struct MagicEffect;
|
|
|
|
struct Sound;
|
|
|
|
}
|
|
|
|
|
2015-08-03 16:08:01 +00:00
|
|
|
namespace CSMTools
|
|
|
|
{
|
|
|
|
/// \brief VerifyStage: make sure that magic effect records are internally consistent
|
|
|
|
class MagicEffectCheckStage : public CSMDoc::Stage
|
|
|
|
{
|
|
|
|
const CSMWorld::IdCollection<ESM::MagicEffect>& mMagicEffects;
|
|
|
|
const CSMWorld::IdCollection<ESM::Sound>& mSounds;
|
2018-08-24 13:57:32 +00:00
|
|
|
const CSMWorld::RefIdCollection& mObjects;
|
2015-08-03 16:08:01 +00:00
|
|
|
const CSMWorld::Resources& mIcons;
|
|
|
|
const CSMWorld::Resources& mTextures;
|
2018-06-19 22:20:03 +00:00
|
|
|
bool mIgnoreBaseRecords;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2015-08-03 16:08:01 +00:00
|
|
|
private:
|
2018-08-24 13:57:32 +00:00
|
|
|
std::string checkObject(
|
2022-10-06 17:39:46 +00:00
|
|
|
const ESM::RefId& id, const CSMWorld::UniversalId& type, const std::string& column) const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2015-08-03 16:08:01 +00:00
|
|
|
public:
|
|
|
|
MagicEffectCheckStage(const CSMWorld::IdCollection<ESM::MagicEffect>& effects,
|
|
|
|
const CSMWorld::IdCollection<ESM::Sound>& sounds, const CSMWorld::RefIdCollection& objects,
|
|
|
|
const CSMWorld::Resources& icons, const CSMWorld::Resources& textures);
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
int setup() override;
|
2015-08-03 16:08:01 +00:00
|
|
|
///< \return number of steps
|
2020-10-16 18:18:54 +00:00
|
|
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
2015-08-03 16:08:01 +00:00
|
|
|
///< Messages resulting from this tage will be appended to \a messages.
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|