Add Creature getter for the library.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-07-25 15:02:11 +02:00
parent 8f921ce89b
commit e6f84f182a
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@ export uint8_t CreatureLib_Creature_Construct(Creature*& out, const BattleLibrar
export void CreatureLib_Creature_Destruct(const Creature* p) { delete p; }
BORROWED_GET_FUNC(Creature, GetLibrary, const CreatureLib::Battling::BattleLibrary*);
BORROWED_GET_FUNC(Creature, GetSpecies, const CreatureLib::Library::CreatureSpecies*);
BORROWED_GET_FUNC(Creature, GetVariant, const CreatureLib::Library::SpeciesVariant*);

View File

@ -80,6 +80,7 @@ namespace CreatureLib::Battling {
_currentHealth = GetBoostedStat(Library::Statistic::Health);
}
inline const ArbUt::BorrowedPtr<const BattleLibrary>& GetLibrary() const noexcept { return _library; }
inline const ArbUt::BorrowedPtr<const Library::CreatureSpecies>& GetSpecies() const noexcept {
return _species;
}