Add function to set variants for a species, and a function to get the count of species in a species library.
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		@@ -39,6 +39,8 @@ namespace CreatureLib::Library {
 | 
				
			|||||||
        [[nodiscard]] const SpeciesVariant* GetVariant(const std::string& key) const;
 | 
					        [[nodiscard]] const SpeciesVariant* GetVariant(const std::string& key) const;
 | 
				
			||||||
        [[nodiscard]] Gender GetRandomGender(Core::Random& rand) const;
 | 
					        [[nodiscard]] Gender GetRandomGender(Core::Random& rand) const;
 | 
				
			||||||
        [[nodiscard]] const std::string& GetName() const;
 | 
					        [[nodiscard]] const std::string& GetName() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        void SetVariant(const std::string& name, const SpeciesVariant* variant) { _variants[name] = variant; }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,6 +26,8 @@ namespace CreatureLib::Library {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        void LoadSpecies(const std::string& name, const CreatureSpecies* species);
 | 
					        void LoadSpecies(const std::string& name, const CreatureSpecies* species);
 | 
				
			||||||
        void DeleteSpecies(const std::string& name);
 | 
					        void DeleteSpecies(const std::string& name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        size_t GetCount() const { return _species.count(); }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user