Add function to set variants for a species, and a function to get the count of species in a species library.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2020-02-08 14:52:45 +01:00
parent e45a36d78e
commit 925763752f
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,8 @@ namespace CreatureLib::Library {
[[nodiscard]] const SpeciesVariant* GetVariant(const std::string& key) const;
[[nodiscard]] Gender GetRandomGender(Core::Random& rand) const;
[[nodiscard]] const std::string& GetName() const;
void SetVariant(const std::string& name, const SpeciesVariant* variant) { _variants[name] = variant; }
};
}

View File

@ -26,6 +26,8 @@ namespace CreatureLib::Library {
void LoadSpecies(const std::string& name, const CreatureSpecies* species);
void DeleteSpecies(const std::string& name);
size_t GetCount() const { return _species.count(); }
};
}