From b8f790cb613f16395d81d087ca8da128a3b0d3b7 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 12 Mar 2022 12:46:05 +0100 Subject: [PATCH] Adds SetType to 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 1e0db07..c6d975a 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp @@ -135,6 +135,9 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) { r = engine->RegisterObjectMethod("Pokemon", "uint8 GetType(uint64 index) const", asFUNCTION(GetTypeWrapper), asCALL_CDECL_OBJFIRST); Ensure(r >= 0); + r = engine->RegisterObjectMethod("Pokemon", "void SetType(uint8 index, uint8 type)", + asMETHOD(PkmnLib::Battling::Pokemon, SetType), asCALL_THISCALL); + Ensure(r >= 0); r = engine->RegisterObjectMethod("Pokemon", "void set_Height(float value) property", asMETHOD(PkmnLib::Battling::Pokemon, SetHeight), asCALL_THISCALL);