2019-12-29 14:29:52 +00:00
|
|
|
#ifndef PKMNLIB_SPECIESLIBRARY_HPP
|
|
|
|
#define PKMNLIB_SPECIESLIBRARY_HPP
|
|
|
|
|
2020-02-08 18:22:29 +00:00
|
|
|
#include <CreatureLib/Library/SpeciesLibrary.hpp>
|
2019-12-29 14:29:52 +00:00
|
|
|
#include "PokemonSpecies.hpp"
|
|
|
|
|
|
|
|
namespace PkmnLib::Library {
|
|
|
|
class SpeciesLibrary : public CreatureLib::Library::SpeciesLibrary {
|
|
|
|
public:
|
2020-02-01 15:56:09 +00:00
|
|
|
|
|
|
|
inline bool TryGetPkmnSpecies(const std::string& name, const PokemonSpecies*& outSpecies) const{
|
|
|
|
return TryGetSpecies(name, (const CreatureLib::Library::CreatureSpecies*&)outSpecies);
|
|
|
|
}
|
|
|
|
|
2019-12-29 14:29:52 +00:00
|
|
|
inline const PokemonSpecies* GetPkmnSpecies(const std::string& name) const {
|
|
|
|
return reinterpret_cast<const PokemonSpecies*>(CreatureLib::Library::SpeciesLibrary::GetSpecies(name));
|
|
|
|
}
|
|
|
|
|
|
|
|
const PokemonSpecies* operator[](const std::string& name) const { return GetPkmnSpecies(name); }
|
|
|
|
|
|
|
|
void LoadSpecies(const std::string& name, const PokemonSpecies* species){
|
|
|
|
CreatureLib::Library::SpeciesLibrary::LoadSpecies(name, species);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // PKMNLIB_SPECIESLIBRARY_HPP
|