1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 13:09:42 +00:00

Update faction and body part record verifier messages

This commit is contained in:
Capostrophic 2018-08-24 21:41:10 +03:00
parent 7535daa94d
commit a9ce155a7b
2 changed files with 12 additions and 14 deletions

View file

@ -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"));
}

View file

@ -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