Commit a9ce155a authored by Capostrophic's avatar Capostrophic

Update faction and body part record verifier messages

parent 7535daa9
......@@ -34,25 +34,24 @@ void CSMTools::BodyPartCheckStage::perform (int stage, CSMDoc::Messages &message
// Check BYDT
if (bodyPart.mData.mPart > 14 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has out of range part value." ));
messages.push_back(std::make_pair(id, "Invalid mesh part"));
if (bodyPart.mData.mFlags > 3 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has out of range flags value." ));
messages.push_back(std::make_pair(id, "Invalid flags"));
if (bodyPart.mData.mType > 2 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has out of range type value." ));
messages.push_back(std::make_pair(id, "Invalid type"));
// Check MODL
if ( bodyPart.mModel.empty() )
messages.push_back(std::make_pair( id, bodyPart.mId + " has no model." ));
messages.push_back(std::make_pair(id, "Model is missing" ));
else if ( mMeshes.searchId( bodyPart.mModel ) == -1 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has invalid model." ));
messages.push_back(std::make_pair(id, "Model '" + bodyPart.mModel + "' does not exist"));
// Check FNAM
if ( bodyPart.mRace.empty() )
messages.push_back(std::make_pair( id, bodyPart.mId + " has no race." ));
messages.push_back(std::make_pair(id, "Race is missing" ));
else if ( mRaces.searchId( bodyPart.mRace ) == -1 )
messages.push_back(std::make_pair( id, bodyPart.mId + " has invalid race." ));
messages.push_back(std::make_pair(id, "Race '" + bodyPart.mRace + " does not exist"));
}
......@@ -37,12 +37,12 @@ void CSMTools::FactionCheckStage::perform (int stage, CSMDoc::Messages& messages
// test for empty name
if (faction.mName.empty())
messages.push_back (std::make_pair (id, faction.mId + " has an empty name"));
messages.push_back (std::make_pair (id, "Name is missing"));
// test for invalid attributes
if (faction.mData.mAttribute[0]==faction.mData.mAttribute[1] && faction.mData.mAttribute[0]!=-1)
{
messages.push_back (std::make_pair (id , "Faction lists same attribute twice"));
messages.push_back (std::make_pair (id, "Same attribute is listed twice"));
}
// test for non-unique skill
......@@ -52,11 +52,10 @@ void CSMTools::FactionCheckStage::perform (int stage, CSMDoc::Messages& messages
if (faction.mData.mSkills[i]!=-1)
++skills[faction.mData.mSkills[i]];
for (std::map<int, int>::const_iterator iter (skills.begin()); iter!=skills.end(); ++iter)
if (iter->second>1)
for (auto &skill : skills)
if (skill.second>1)
{
messages.push_back (std::make_pair (id,
ESM::Skill::indexToId (iter->first) + " is listed more than once"));
messages.push_back (std::make_pair (id, "Skill " + ESM::Skill::indexToId (skill.first) + " is listed more than once"));
}
/// \todo check data members that can't be edited in the table view
......
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