From d588ba5dd20f70a6ff83bb1c9b86459f579ff3cf Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 24 Oct 2021 15:47:07 +0200 Subject: [PATCH] Adds interface for HasVolatile to Pokemon in Angelscript. --- .../AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp index 9ae068c..4421da1 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp @@ -147,6 +147,9 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) { r = engine->RegisterObjectMethod("Pokemon", "int8 GetStatBoost(Statistic stat) const", asMETHOD(PkmnLib::Battling::Pokemon, GetStatBoost), asCALL_THISCALL); Ensure(r >= 0); + r = engine->RegisterObjectMethod("Pokemon", "bool HasVolatile(const constString &in name)", + asMETHOD(PkmnLib::Battling::Pokemon, HasVolatileScript), asCALL_CDECL_OBJFIRST); + Ensure(r >= 0); r = engine->RegisterObjectMethod("Pokemon", "ref@ AddVolatile(const constString &in name)", asFUNCTION(AddVolatileWrapper), asCALL_CDECL_OBJFIRST); Ensure(r >= 0);