Adds some more Angelscript functionality for the BattleSide.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -91,7 +91,6 @@ void AngelScriptResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg,
|
||||
|
||||
_contextPool = new ContextPool(_engine);
|
||||
}
|
||||
OPTIONAL_BORROWED_PTR_GETTER_FUNC(PkmnLib::Battling::Pokemon, CreatureLib::Battling::Battle, GetBattle);
|
||||
|
||||
void AngelScriptResolver::RegisterTypes() {
|
||||
// Register static library types
|
||||
@@ -104,14 +103,17 @@ void AngelScriptResolver::RegisterTypes() {
|
||||
RegisterEffectParameter::Register(_engine);
|
||||
|
||||
// Register battle types
|
||||
// Predeclare these two types, and declare their implementation later.
|
||||
[[maybe_unused]] int r = _engine->RegisterObjectType("Battle", 0, asOBJ_REF | asOBJ_NOCOUNT);
|
||||
Ensure(r >= 0);
|
||||
r = _engine->RegisterObjectType("BattleSide", 0, asOBJ_REF | asOBJ_NOCOUNT);
|
||||
Ensure(r >= 0);
|
||||
|
||||
RegisterPokemonClass::Register(_engine);
|
||||
RegisterExecutingAttack::Register(_engine);
|
||||
RegisterTurnChoices::Register(_engine);
|
||||
RegisterBattleLibrary::Register(_engine);
|
||||
RegisterBattleClass::Register(_engine);
|
||||
[[maybe_unused]] int r = _engine->RegisterObjectMethod("Pokemon", "const Battle@ get_Battle() const property",
|
||||
asFUNCTION(GetBattleWrapper), asCALL_CDECL_OBJFIRST);
|
||||
Ensure(r >= 0);
|
||||
|
||||
// Register base script
|
||||
BasicScriptClass::Register(_engine);
|
||||
|
||||
Reference in New Issue
Block a user