Support for getting natures by index for iterating purposes.

This commit is contained in:
2020-08-09 11:31:22 +02:00
parent ca087a7ed8
commit de3ad4a9c8
2 changed files with 10 additions and 0 deletions

View File

@@ -42,6 +42,11 @@ namespace PkmnLib::Library {
}
throw CreatureException("Nature not found.");
}
size_t GetNatureCount() const noexcept { return _items.size(); }
inline const ArbUt::StringView& GetNatureFromIndex(size_t index) const {
return std::next(std::begin(_items), index)->first;
}
};
}