This commit is contained in:
		@@ -23,6 +23,12 @@ namespace CreatureLib::Library {
 | 
			
		||||
        CreatureSpecies(uint16_t id, std::string name, const SpeciesVariant* defaultVariant,
 | 
			
		||||
                float genderRatio, std::string growthRate, uint8_t captureRate, uint8_t baseHappiness);
 | 
			
		||||
 | 
			
		||||
        ~CreatureSpecies(){
 | 
			
		||||
            for (auto v: _variants)
 | 
			
		||||
                delete v.second;
 | 
			
		||||
            _variants.clear();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [[nodiscard]] const SpeciesVariant* GetVariant(const std::string& key) const;
 | 
			
		||||
        [[nodiscard]] Gender GetRandomGender(Core::Random& rand) const;
 | 
			
		||||
    };
 | 
			
		||||
 
 | 
			
		||||
@@ -27,6 +27,7 @@ namespace CreatureLib::Library {
 | 
			
		||||
        SpeciesVariant(std::string name, float height, float weight, uint32_t baseExperience,
 | 
			
		||||
                std::vector<std::string> types, Core::StatisticSet baseStats, std::vector<std::string> talents,
 | 
			
		||||
                std::vector<std::string> secretTalents);
 | 
			
		||||
 | 
			
		||||
        [[nodiscard]] size_t GetTypeCount() const;
 | 
			
		||||
        [[nodiscard]] std::string GetType(size_t index) const;
 | 
			
		||||
        [[nodiscard]] uint32_t GetStatistic(Core::Statistic stat) const;
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,8 @@ namespace CreatureLib::Library {
 | 
			
		||||
        SpeciesLibrary() = default;
 | 
			
		||||
 | 
			
		||||
        ~SpeciesLibrary(){
 | 
			
		||||
            for (auto s: _species)
 | 
			
		||||
                delete s.second;
 | 
			
		||||
            _species.clear();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user