Adds Angelscript getter on BattleSide for getting an narray of Pokemon.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-11-20 10:24:03 +01:00
parent 1d90360efe
commit 95457d9701
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,8 @@ void RegisterBattleClass::RegisterBattleSide(asIScriptEngine* engine) {
REGISTER_GETTER("BattleSide", "bool get_HasFled() const property", CreatureLib::Battling::BattleSide, HasFled);
REGISTER_GETTER("BattleSide", "Battle@ get_Battle() const property", CreatureLib::Battling::BattleSide, GetBattle);
REGISTER_GETTER("BattleSide", "narray<Pokemon>@ get_Pokemon() const property", CreatureLib::Battling::BattleSide,
GetCreatures);
r = engine->RegisterObjectMethod("BattleSide", "uint8 GetPokemonIndex(const Pokemon@ pokemon) const",
asFUNCTION(GetPokemonIndexWrapper), asCALL_CDECL_OBJFIRST);
Ensure(r >= 0);