Update CreatureLib.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a8f3e30049
commit
939cf4e328
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 2.8.12)
|
cmake_minimum_required(VERSION 2.8.12)
|
||||||
|
|
||||||
project(angelscript-download NONE)
|
project(pkmnLib NONE)
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 2.8.12)
|
cmake_minimum_required(VERSION 2.8.12)
|
||||||
|
|
||||||
project(creaturelib-download NONE)
|
project(pkmnLib NONE)
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(CreatureLibProj
|
ExternalProject_Add(CreatureLibProj
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#define PKMN_HOOK(hookName, source, ...) \
|
#define PKMN_HOOK(hookName, source, ...) \
|
||||||
{ \
|
{ \
|
||||||
auto aggregator = source->GetScriptIterator(); \
|
auto aggregator = source->GetScriptIterator(); \
|
||||||
while (aggregator.HasNext()) { \
|
ArbUt::BorrowedPtr<CreatureLib::Battling::BattleScript> next = (CreatureLib::Battling::BattleScript*)1; \
|
||||||
auto next = aggregator.GetNext(); \
|
while (aggregator.GetNext(next)) { \
|
||||||
auto castNext = next.ForceAs<PkmnLib::Battling::PkmnScript>(); \
|
auto castNext = next.ForceAs<PkmnLib::Battling::PkmnScript>(); \
|
||||||
castNext->hookName(__VA_ARGS__); \
|
castNext->hookName(__VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -391,11 +391,9 @@ TEST_CASE("Add Volatile with return script function") {
|
||||||
|
|
||||||
script->OnSecondaryEffect(nullptr, mon, 0);
|
script->OnSecondaryEffect(nullptr, mon, 0);
|
||||||
|
|
||||||
auto scriptObjOption =
|
ArbUt::BorrowedPtr<CreatureLib::Battling::BattleScript> scriptObj = (CreatureLib::Battling::BattleScript*)1;
|
||||||
const_cast<CreatureLib::Battling::ScriptAggregator&>(mon->GetScriptIterator()).GetNextNotNull();
|
REQUIRE(const_cast<CreatureLib::Battling::ScriptAggregator&>(mon->GetScriptIterator()).GetNext(scriptObj));
|
||||||
REQUIRE(scriptObjOption.has_value());
|
REQUIRE(scriptObj->GetName() == "AddVolatileModSecondary"_cnc);
|
||||||
REQUIRE(scriptObjOption.value()->GetName() == "AddVolatileModSecondary"_cnc);
|
|
||||||
auto scriptObj = scriptObjOption.value();
|
|
||||||
auto script2 = scriptObj.As<AngelScriptScript>();
|
auto script2 = scriptObj.As<AngelScriptScript>();
|
||||||
auto ctxPool = script2->GetContextPool();
|
auto ctxPool = script2->GetContextPool();
|
||||||
auto ctx = ctxPool->RequestContext();
|
auto ctx = ctxPool->RequestContext();
|
||||||
|
|
Loading…
Reference in New Issue