mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 19:56:38 +00:00 
			
		
		
		
	Working on leveled lists now.
This commit is contained in:
		
							parent
							
								
									6c95cea4c4
								
							
						
					
					
						commit
						360a939aa0
					
				
					 4 changed files with 34 additions and 1 deletions
				
			
		|  | @ -19,7 +19,8 @@ CSMTools::ReferenceableCheckStage::ReferenceableCheckStage(const CSMWorld::RefId | |||
|     mContainersSize(0), | ||||
|     mCreaturesSize(0), | ||||
|     mDoorsSize(0), | ||||
|     mIngredientsSize(0) | ||||
|     mIngredientsSize(0), | ||||
|     mCreaturesLevListsSize(0) | ||||
| { | ||||
|     setSizeVariables(); | ||||
| } | ||||
|  | @ -36,6 +37,7 @@ void CSMTools::ReferenceableCheckStage::setSizeVariables() | |||
|     mCreaturesSize = mReferencables.getCreatures().getSize(); | ||||
|     mDoorsSize = mReferencables.getDoors().getSize(); | ||||
|     mIngredientsSize = mReferencables.getIngredients().getSize(); | ||||
|     mCreaturesLevListsSize = mReferencables.getCreatureLevelledLists().getSize(); | ||||
| } | ||||
| 
 | ||||
| void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::string >& messages) | ||||
|  | @ -104,6 +106,14 @@ void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::str | |||
|     } | ||||
| 
 | ||||
|     stage -= mDoorsSize; | ||||
|      | ||||
|     if (stage < mIngredientsSize) | ||||
|     { | ||||
|       ingredientCheck(stage, mReferencables.getIngredients(), messages); | ||||
|       return; | ||||
|     } | ||||
|      | ||||
|     stage -= mIngredientsSize; | ||||
| } | ||||
| 
 | ||||
| int CSMTools::ReferenceableCheckStage::setup() | ||||
|  | @ -577,3 +587,18 @@ void CSMTools::ReferenceableCheckStage::ingredientCheck(int stage, const CSMWorl | |||
|         messages.push_back(id.toString() + "|" + Ingredient.mId + " has no icon"); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void CSMTools::ReferenceableCheckStage::creaturesLevListCheck(int stage, const CSMWorld::RefIdDataContainer< ESM::CreatureLevList >& records, std::vector< std::string >& messages) | ||||
| { | ||||
|       const CSMWorld::RecordBase& baserecord = records.getRecord(stage); | ||||
| 
 | ||||
|     if (baserecord.isDeleted()) | ||||
|     { | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     const ESM::CreatureLevList& CreatureLevList = (static_cast<const CSMWorld::Record<ESM::CreatureLevList>& >(baserecord)).get(); | ||||
|     CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_CreatureLevList, CreatureLevList.mId); | ||||
|      | ||||
|     //TODO(!)
 | ||||
| } | ||||
|  | @ -27,6 +27,7 @@ namespace CSMTools | |||
|             void creatureCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Creature>& records, std::vector<std::string>& messages); | ||||
|             void doorCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Door>& records, std::vector<std::string>& messages); | ||||
| 	    void ingredientCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::Ingredient>& records, std::vector<std::string>& messages); | ||||
| 	    void creaturesLevListCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::CreatureLevList>& records, std::vector<std::string>& messages); | ||||
| 
 | ||||
|             void setSizeVariables(); | ||||
| 
 | ||||
|  | @ -43,6 +44,7 @@ namespace CSMTools | |||
| 	    int mCreaturesSize; | ||||
| 	    int mDoorsSize; | ||||
| 	    int mIngredientsSize; | ||||
| 	    int mCreaturesLevListsSize; | ||||
|     }; | ||||
| } | ||||
| #endif // REFERENCEABLECHECKSTAGE_H
 | ||||
|  |  | |||
|  | @ -281,3 +281,8 @@ const CSMWorld::RefIdDataContainer< ESM::Ingredient >& CSMWorld::RefIdData::getI | |||
| { | ||||
|     return mIngredients; | ||||
| } | ||||
| 
 | ||||
| const CSMWorld::RefIdDataContainer< ESM::CreatureLevList >& CSMWorld::RefIdData::getCreatureLevelledLists() const | ||||
| { | ||||
|     return mCreatureLevelledLists; | ||||
| } | ||||
|  |  | |||
|  | @ -231,6 +231,7 @@ namespace CSMWorld | |||
| 	    const RefIdDataContainer<ESM::Creature>& getCreatures() const; | ||||
| 	    const RefIdDataContainer<ESM::Door>& getDoors() const; | ||||
| 	    const RefIdDataContainer<ESM::Ingredient>& getIngredients() const; | ||||
| 	    const RefIdDataContainer<ESM::CreatureLevList>& getCreatureLevelledLists() const; | ||||
|     }; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue