From e22409c266ecb953c64d12faecbdcab243248467 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 6 May 2018 00:13:09 +0300 Subject: [PATCH 1/3] Fix sound range warning message --- apps/opencs/model/tools/soundcheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/opencs/model/tools/soundcheck.cpp b/apps/opencs/model/tools/soundcheck.cpp index 6a059bee2..3dbd3ef11 100644 --- a/apps/opencs/model/tools/soundcheck.cpp +++ b/apps/opencs/model/tools/soundcheck.cpp @@ -27,7 +27,7 @@ void CSMTools::SoundCheckStage::perform (int stage, CSMDoc::Messages& messages) CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Sound, sound.mId); if (sound.mData.mMinRange>sound.mData.mMaxRange) - messages.push_back (std::make_pair (id, "Maximum range larger than minimum range")); + messages.push_back (std::make_pair (id, "Minimum range larger than maximum range")); /// \todo check, if the sound file exists } From 91b97a27ea0a2c19cf9e6c2adea4fb77b595aa61 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 6 May 2018 00:14:14 +0300 Subject: [PATCH 2/3] Remove empty class description warning --- apps/opencs/model/tools/classcheck.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/opencs/model/tools/classcheck.cpp b/apps/opencs/model/tools/classcheck.cpp index e4964d4e3..316fc0ce5 100644 --- a/apps/opencs/model/tools/classcheck.cpp +++ b/apps/opencs/model/tools/classcheck.cpp @@ -32,9 +32,6 @@ void CSMTools::ClassCheckStage::perform (int stage, CSMDoc::Messages& messages) if (class_.mName.empty()) messages.push_back (std::make_pair (id, class_.mId + " has an empty name")); - if (class_.mDescription.empty()) - messages.push_back (std::make_pair (id, class_.mId + " has an empty description")); - // test for invalid attributes for (int i=0; i<2; ++i) if (class_.mData.mAttribute[i]==-1) From 2502d538167e503bcfae6e1f1ada1bb2360f3e94 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 6 May 2018 00:23:05 +0300 Subject: [PATCH 3/3] Object record verifier updates Removed light 0 duration warning Spelling fixes --- .../opencs/model/tools/referenceablecheck.cpp | 41 ++----------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/apps/opencs/model/tools/referenceablecheck.cpp b/apps/opencs/model/tools/referenceablecheck.cpp index 4dd3e1edf..750c3ceb4 100644 --- a/apps/opencs/model/tools/referenceablecheck.cpp +++ b/apps/opencs/model/tools/referenceablecheck.cpp @@ -239,9 +239,7 @@ void CSMTools::ReferenceableCheckStage::bookCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Book& book = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Book, book.mId); @@ -260,9 +258,7 @@ void CSMTools::ReferenceableCheckStage::activatorCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Activator& activator = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Activator, activator.mId); @@ -283,9 +279,7 @@ void CSMTools::ReferenceableCheckStage::potionCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Potion& potion = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Potion, potion.mId); @@ -306,9 +300,7 @@ void CSMTools::ReferenceableCheckStage::apparatusCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Apparatus& apparatus = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Apparatus, apparatus.mId); @@ -329,9 +321,7 @@ void CSMTools::ReferenceableCheckStage::armorCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Armor& armor = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Armor, armor.mId); @@ -358,9 +348,7 @@ void CSMTools::ReferenceableCheckStage::clothingCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Clothing& clothing = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Clothing, clothing.mId); @@ -378,9 +366,7 @@ void CSMTools::ReferenceableCheckStage::containerCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Container& container = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Container, container.mId); @@ -512,9 +498,7 @@ void CSMTools::ReferenceableCheckStage::ingredientCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Ingredient& ingredient = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Ingredient, ingredient.mId); @@ -577,13 +561,8 @@ void CSMTools::ReferenceableCheckStage::lightCheck( messages.push_back (std::make_pair (id, light.mId + " has negative light radius")); if (light.mData.mFlags & ESM::Light::Carry) - { inventoryItemCheck(light, messages, id.toString()); - if (light.mData.mTime == 0) - messages.push_back (std::make_pair (id, light.mId + " has zero duration")); - } - // Check that mentioned scripts exist scriptCheck(light, messages, id.toString()); } @@ -596,9 +575,7 @@ void CSMTools::ReferenceableCheckStage::lockpickCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Lockpick& lockpick = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Lockpick, lockpick.mId); @@ -619,9 +596,7 @@ void CSMTools::ReferenceableCheckStage::miscCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Miscellaneous& miscellaneous = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Miscellaneous, miscellaneous.mId); @@ -706,22 +681,14 @@ void CSMTools::ReferenceableCheckStage::npcCheck ( messages.push_back (std::make_pair (id, npc.mId + " has any empty name")); if (npc.mClass.empty()) - { - messages.push_back (std::make_pair (id, npc.mId + " has any empty class")); - } + messages.push_back (std::make_pair (id, npc.mId + " has an empty class")); else if (mClasses.searchId (npc.mClass) == -1) - { messages.push_back (std::make_pair (id, npc.mId + " has invalid class")); - } if (npc.mRace.empty()) - { - messages.push_back (std::make_pair (id, npc.mId + " has any empty race")); - } + messages.push_back (std::make_pair (id, npc.mId + " has an empty race")); else if (mRaces.searchId (npc.mRace) == -1) - { messages.push_back (std::make_pair (id, npc.mId + " has invalid race")); - } if (disposition < 0) messages.push_back (std::make_pair (id, npc.mId + " has negative disposition")); @@ -823,7 +790,7 @@ void CSMTools::ReferenceableCheckStage::weaponCheck( { //checking of health if (weapon.mData.mHealth <= 0) - messages.push_back (std::make_pair (id, weapon.mId + " has non-positivie health")); + messages.push_back (std::make_pair (id, weapon.mId + " has non-positive health")); if (weapon.mData.mReach < 0) messages.push_back (std::make_pair (id, weapon.mId + " has negative reach")); @@ -842,9 +809,7 @@ void CSMTools::ReferenceableCheckStage::probeCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Probe& probe = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Probe, probe.mId);