Update CreatureLib, added RemoveVolatile function to AngelScript.

This commit is contained in:
Deukhoofd 2020-02-23 12:46:44 +01:00
parent 6a3df344da
commit e27cc2270d
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
3 changed files with 9 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class PkmnLibConan(ConanFile):
self.options["AngelScript"].link_std_statically = True
def requirements(self):
self.requires("CreatureLib/645ba95bbc46f4add28ba6440a707e89ea609a25@creaturelib/master")
self.requires("CreatureLib/5f891cd4edb72e948d5c63f518c5d6eeeb52dd74@creaturelib/master")
if self.options.script_handler == "angelscript":
self.requires("AngelScript/2.34@AngelScript/Deukhoofd")
else:

View File

@ -64,4 +64,8 @@ void RegisterBattleClass::RegisterBattle(asIScriptEngine* engine) {
"Battle", "void AddVolatile(const string &in name) const",
asMETHODPR(CreatureLib::Battling::Battle, AddVolatileScript, (const std::string&), void), asCALL_THISCALL);
assert(r >= 0);
r = engine->RegisterObjectMethod(
"Battle", "void RemoveVolatile(const string &in name) const",
asMETHODPR(CreatureLib::Battling::Battle, RemoveVolatileScript, (const std::string&), void), asCALL_THISCALL);
assert(r >= 0);
}

View File

@ -179,4 +179,8 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) {
"Pokemon", "void AddVolatile(const string &in name) const",
asMETHODPR(PkmnLib::Battling::Pokemon, AddVolatileScript, (const std::string&), void), asCALL_THISCALL);
assert(r >= 0);
r = engine->RegisterObjectMethod(
"Pokemon", "void RemoveVolatile(const string &in name) const",
asMETHODPR(PkmnLib::Battling::Pokemon, RemoveVolatileScript, (const std::string&), void), asCALL_THISCALL);
assert(r >= 0);
}