diff --git a/src/Library/CreatureData/CreatureSpecies.cpp b/src/Library/CreatureData/CreatureSpecies.cpp index 16b3fb5..04f2ef5 100644 --- a/src/Library/CreatureData/CreatureSpecies.cpp +++ b/src/Library/CreatureData/CreatureSpecies.cpp @@ -13,7 +13,7 @@ bool CreatureSpecies::HasVariant(const std::string& name) const { return _variants.find(key) != _variants.end(); } -bool CreatureSpecies::TryGetVariant(const std::string& name, const SpeciesVariant*& out) { +bool CreatureSpecies::TryGetVariant(const std::string& name, const SpeciesVariant*& out) const { auto key = name; std::transform(key.begin(), key.end(), key.end(), ::tolower); auto find = _variants.find(key); diff --git a/src/Library/CreatureData/CreatureSpecies.hpp b/src/Library/CreatureData/CreatureSpecies.hpp index 2c62beb..23455ea 100644 --- a/src/Library/CreatureData/CreatureSpecies.hpp +++ b/src/Library/CreatureData/CreatureSpecies.hpp @@ -37,7 +37,7 @@ namespace CreatureLib::Library { inline uint8_t GetCaptureRate() const { return _captureRate; } [[nodiscard]] bool HasVariant(const std::string& key) const; - [[nodiscard]] bool TryGetVariant(const std::string& name, const SpeciesVariant*& out); + [[nodiscard]] bool TryGetVariant(const std::string& name, const SpeciesVariant*& out) const; [[nodiscard]] const SpeciesVariant* GetVariant(const std::string& key) const; [[nodiscard]] Gender GetRandomGender(Core::Random& rand) const; [[nodiscard]] const std::string& GetName() const;