From 95457d970154a003e3ffef18ceea97ed56d67c23 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 20 Nov 2021 10:24:03 +0100 Subject: [PATCH] Adds Angelscript getter on BattleSide for getting an narray of Pokemon. --- .../AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp index 56a5f5d..97b80c0 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp @@ -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@ 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);