Support for finding the previous evolution step of a Pokemon.

This commit is contained in:
2020-08-11 21:46:22 +02:00
parent 9274b675e9
commit 5e917b7047
3 changed files with 33 additions and 0 deletions

View File

@@ -6,6 +6,9 @@
namespace PkmnLib::Library {
class SpeciesLibrary : public CreatureLib::Library::SpeciesLibrary {
ArbUt::Dictionary<ArbUt::BorrowedPtr<const PokemonSpecies>, ArbUt::BorrowedPtr<const PokemonSpecies>>
_preEvolutionCache;
public:
inline bool TryGet(const ArbUt::BasicStringView& name,
ArbUt::BorrowedPtr<const PokemonSpecies>& outSpecies) const {
@@ -26,6 +29,9 @@ namespace PkmnLib::Library {
void Insert(const ArbUt::StringView& name, const PokemonSpecies* species) {
CreatureLib::Library::SpeciesLibrary::Insert(name, species);
}
ArbUt::BorrowedPtr<const PokemonSpecies>
FindPreEvolution(const ArbUt::BorrowedPtr<const PokemonSpecies>& species) const noexcept;
};
}