Adds angelscript wrappers for getting, setting, and clearing status.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-05-08 12:21:25 +02:00
parent 6def68cf72
commit de82bbecf4
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 9 additions and 0 deletions

View File

@ -203,4 +203,13 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
r = engine->RegisterObjectMethod("Pokemon", "BattleSide@ get_BattleSide() const property", r = engine->RegisterObjectMethod("Pokemon", "BattleSide@ get_BattleSide() const property",
asFUNCTION(GetBattleSideWrapper), asCALL_CDECL_OBJFIRST); asFUNCTION(GetBattleSideWrapper), asCALL_CDECL_OBJFIRST);
Ensure(r >= 0); Ensure(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "const constString& get_Status() const property",
asMETHOD(PkmnLib::Battling::Pokemon, GetStatusName), asCALL_THISCALL);
Ensure(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "void ClearStatus() const",
asMETHOD(PkmnLib::Battling::Pokemon, ClearStatus), asCALL_THISCALL);
Ensure(r >= 0);
r = engine->RegisterObjectMethod("Pokemon", "void SetStatus(const constString& name)",
asMETHOD(PkmnLib::Battling::Pokemon, SetStatus), asCALL_THISCALL);
Ensure(r >= 0);
} }