Commit 5a86554f authored by Capostrophic's avatar Capostrophic

Cleanup

parent c0254275
#include "birthsigncheck.hpp"
#include <components/esm/loadbsgn.hpp>
#include <components/misc/resourcehelpers.hpp>
#include "../prefs/state.hpp"
......@@ -42,11 +41,8 @@ void CSMTools::BirthsignCheckStage::perform (int stage, CSMDoc::Messages& messag
if (birthsign.mTexture.empty())
messages.add(id, "Image is missing", "", CSMDoc::Message::Severity_Error);
else
else if (mTextures.searchId(birthsign.mTexture) == -1)
{
if (mTextures.searchId(birthsign.mTexture) != -1)
return;
std::string ddsTexture = birthsign.mTexture;
if (!(Misc::ResourceHelpers::changeExtensionToDds(ddsTexture) && mTextures.searchId(ddsTexture) != -1))
messages.add(id, "Image '" + birthsign.mTexture + "' does not exist", "", CSMDoc::Message::Severity_Error);
......
#include "factioncheck.hpp"
#include <sstream>
#include <map>
#include <components/esm/loadfact.hpp>
#include <components/esm/loadskil.hpp>
#include "../prefs/state.hpp"
......
#include "journalcheck.hpp"
#include <set>
#include <sstream>
#include "../prefs/state.hpp"
......@@ -63,12 +62,10 @@ void CSMTools::JournalCheckStage::perform(int stage, CSMDoc::Messages& messages)
std::pair<std::set<int>::iterator, bool> result = questIndices.insert(journalInfo.mData.mJournalIndex);
// Duplicate index
if (result.second == false)
if (!result.second)
{
CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_JournalInfo, journalInfo.mId);
std::ostringstream stream;
stream << "Duplicated quest index " << journalInfo.mData.mJournalIndex;
messages.add(id, stream.str(), "", CSMDoc::Message::Severity_Error);
messages.add(id, "Duplicated quest index " + std::to_string(journalInfo.mData.mJournalIndex), "", CSMDoc::Message::Severity_Error);
}
}
......
......@@ -23,9 +23,7 @@ namespace CSMTools
bool mIgnoreBaseRecords;
private:
std::string checkTexture(const std::string &texture, bool isIcon) const;
std::string checkObject(const std::string &id, const CSMWorld::UniversalId &type, const std::string &column) const;
std::string checkSound(const std::string &id, const std::string &column) const;
public:
MagicEffectCheckStage(const CSMWorld::IdCollection<ESM::MagicEffect> &effects,
......
#include "racecheck.hpp"
#include <sstream>
#include <components/esm/loadrace.hpp>
#include "../prefs/state.hpp"
#include "../world/universalid.hpp"
......@@ -28,10 +24,8 @@ void CSMTools::RaceCheckStage::performPerRecord (int stage, CSMDoc::Messages& me
CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Race, race.mId);
// test for empty name and description
if (race.mName.empty() && race.mData.mFlags & 0x1)
messages.add(id, "Name is missing", "", CSMDoc::Message::Severity_Error);
else if (race.mName.empty())
messages.add(id, "Name is missing", "", CSMDoc::Message::Severity_Warning);
if (race.mName.empty())
messages.add(id, "Name is missing", "", (race.mData.mFlags & 0x1) ? CSMDoc::Message::Severity_Error : CSMDoc::Message::Severity_Warning);
if (race.mDescription.empty())
messages.add(id, "Description is missing", "", CSMDoc::Message::Severity_Warning);
......
#include "regioncheck.hpp"
#include <sstream>
#include <map>
#include <components/esm/loadregn.hpp>
#include "../prefs/state.hpp"
#include "../world/universalid.hpp"
......
#include "skillcheck.hpp"
#include <components/esm/loadskil.hpp>
#include "../prefs/state.hpp"
#include "../world/universalid.hpp"
......@@ -37,6 +35,6 @@ void CSMTools::SkillCheckStage::perform (int stage, CSMDoc::Messages& messages)
for (int i=0; i<4; ++i)
if (skill.mData.mUseValue[i]<0)
{
messages.add(id, "Usage experience value #" + std::to_string(i) + " is negative", "", CSMDoc::Message::Severity_Error);
messages.add(id, "Use value #" + std::to_string(i) + " is negative", "", CSMDoc::Message::Severity_Error);
}
}
#include "soundcheck.hpp"
#include <components/esm/loadskil.hpp>
#include "../prefs/state.hpp"
#include "../world/universalid.hpp"
......@@ -35,7 +33,7 @@ void CSMTools::SoundCheckStage::perform (int stage, CSMDoc::Messages& messages)
if (sound.mData.mMinRange>sound.mData.mMaxRange)
{
messages.add(id, "Minimum range larger than maximum range", "", CSMDoc::Message::Severity_Warning);
messages.add(id, "Minimum range is larger than maximum range", "", CSMDoc::Message::Severity_Warning);
}
if (sound.mSound.empty())
......
#include "soundgencheck.hpp"
#include <sstream>
#include "../prefs/state.hpp"
#include "../world/refiddata.hpp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment