Update CreatureLib, handle getting formes cleaner.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -24,6 +24,12 @@ namespace PkmnLib::Library {
|
||||
return reinterpret_cast<const PokemonForme*>(CreatureSpecies::GetVariant("default"));
|
||||
}
|
||||
|
||||
inline bool HasForme(const std::string& key) const { return HasVariant(key); }
|
||||
|
||||
inline bool TryGetForme(const std::string& key, const PokemonForme*& forme) const {
|
||||
return TryGetVariant(key, (const CreatureLib::Library::SpeciesVariant*&)forme);
|
||||
}
|
||||
|
||||
inline const PokemonForme* GetForme(const std::string& key) const {
|
||||
return reinterpret_cast<const PokemonForme*>(CreatureSpecies::GetVariant(key));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user