Update to newest version of CreatureLib.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
19cfcc9e32
commit
b1f101d646
|
@ -45,7 +45,7 @@ class PkmnLibConan(ConanFile):
|
|||
self.options["AngelScript"].link_std_statically = True
|
||||
|
||||
def requirements(self):
|
||||
self.requires("CreatureLib/b886f0aebf86945ef333ce0913d1661c2396adf9@creaturelib/master")
|
||||
self.requires("CreatureLib/d4fd7282f5fe52acafae0098168a66e4a613bffd@creaturelib/master")
|
||||
if self.options.script_handler == "angelscript":
|
||||
self.requires("AngelScript/2.34@AngelScript/Deukhoofd")
|
||||
else:
|
||||
|
|
|
@ -108,14 +108,14 @@ void AngelScripResolver::MessageCallback(const asSMessageInfo* msg, void* param)
|
|||
printf("%s (%d, %d) : %s : %s\n", msg->section, msg->row, msg->col, type, msg->message);
|
||||
}
|
||||
|
||||
static constexpr const char* GetCategoryNamespace(AngelScripResolver::ScriptCategory category) {
|
||||
static constexpr const char* GetCategoryNamespace(ScriptCategory category) {
|
||||
switch (category) {
|
||||
case CreatureLib::Battling::ScriptResolver::ScriptCategory::Attack: return "Moves";
|
||||
case CreatureLib::Battling::ScriptResolver::ScriptCategory::Talent: return "Abilities";
|
||||
case CreatureLib::Battling::ScriptResolver::ScriptCategory::Status: return "Status";
|
||||
case CreatureLib::Battling::ScriptResolver::ScriptCategory::Creature: return "Pokemon";
|
||||
case CreatureLib::Battling::ScriptResolver::ScriptCategory::Battle: return "Battle";
|
||||
case CreatureLib::Battling::ScriptResolver::ScriptCategory::Side: return "Side";
|
||||
case ScriptCategory::Attack: return "Moves";
|
||||
case ScriptCategory::Talent: return "Abilities";
|
||||
case ScriptCategory::Status: return "Status";
|
||||
case ScriptCategory::Creature: return "Pokemon";
|
||||
case ScriptCategory::Battle: return "Battle";
|
||||
case ScriptCategory::Side: return "Side";
|
||||
default: throw CreatureException("Unknown script category");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* m
|
|||
|
||||
static AngelScriptScript* GetScript(PkmnLib::Battling::BattleLibrary* mainLib, const char* scriptName) {
|
||||
auto lib = GetScriptResolver(mainLib);
|
||||
auto s = lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, scriptName);
|
||||
auto s = lib->LoadScript(ScriptCategory::Creature, scriptName);
|
||||
auto script = dynamic_cast<AngelScriptScript*>(s);
|
||||
return script;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ TEST_CASE("Build script resolver, then create object") {
|
|||
lib->CreateScript("testScript1" , _scripts["testScript1"]);
|
||||
lib->FinalizeModule();
|
||||
|
||||
auto obj = lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, "testScript1");
|
||||
auto obj = lib->LoadScript(ScriptCategory::Creature, "testScript1");
|
||||
|
||||
delete obj;
|
||||
delete lib;
|
||||
|
@ -53,7 +53,7 @@ TEST_CASE("Build script resolver, create object, invoke addition method") {
|
|||
lib->FinalizeModule();
|
||||
|
||||
auto obj =
|
||||
dynamic_cast<AngelScriptScript*>(lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, "testScript1"));
|
||||
dynamic_cast<AngelScriptScript*>(lib->LoadScript(ScriptCategory::Creature, "testScript1"));
|
||||
auto ctxPool = obj->GetContextPool();
|
||||
auto ctx = ctxPool->RequestContext();
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* m
|
|||
|
||||
static ScriptData GetScript(PkmnLib::Battling::BattleLibrary* mainLib, const char* funcName) {
|
||||
auto lib = GetScriptResolver(mainLib);
|
||||
auto s = lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, "testScript1");
|
||||
auto s = lib->LoadScript(ScriptCategory::Creature, "testScript1");
|
||||
auto script = dynamic_cast<AngelScriptScript*>(s);
|
||||
auto ctxPool = script->GetContextPool();
|
||||
auto ctx = ctxPool->RequestContext();
|
||||
|
|
|
@ -43,7 +43,7 @@ static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* m
|
|||
|
||||
static ScriptData GetScript(PkmnLib::Battling::BattleLibrary* mainLib, const char* funcName) {
|
||||
auto lib = GetScriptResolver(mainLib);
|
||||
auto s = lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, "testScript1");
|
||||
auto s = lib->LoadScript(ScriptCategory::Creature, "testScript1");
|
||||
auto script = dynamic_cast<AngelScriptScript*>(s);
|
||||
auto ctxPool = script->GetContextPool();
|
||||
auto ctx = ctxPool->RequestContext();
|
||||
|
|
|
@ -39,7 +39,7 @@ static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* m
|
|||
|
||||
static ScriptData GetScript(PkmnLib::Battling::BattleLibrary* mainLib, const char* funcName) {
|
||||
auto lib = GetScriptResolver(mainLib);
|
||||
auto s = lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, "testScript1");
|
||||
auto s = lib->LoadScript(ScriptCategory::Creature, "testScript1");
|
||||
auto script = dynamic_cast<AngelScriptScript*>(s);
|
||||
auto ctxPool = script->GetContextPool();
|
||||
auto ctx = ctxPool->RequestContext();
|
||||
|
|
|
@ -43,7 +43,7 @@ static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* m
|
|||
|
||||
static ScriptData GetScript(PkmnLib::Battling::BattleLibrary* mainLib, const char* funcName) {
|
||||
auto lib = GetScriptResolver(mainLib);
|
||||
auto s = lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, "testScript1");
|
||||
auto s = lib->LoadScript(ScriptCategory::Creature, "testScript1");
|
||||
auto script = dynamic_cast<AngelScriptScript*>(s);
|
||||
auto ctxPool = script->GetContextPool();
|
||||
auto ctx = ctxPool->RequestContext();
|
||||
|
|
|
@ -41,7 +41,7 @@ static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* m
|
|||
|
||||
static ScriptData GetScript(PkmnLib::Battling::BattleLibrary* mainLib, const char* funcName) {
|
||||
auto lib = GetScriptResolver(mainLib);
|
||||
auto s = lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, "testScript1");
|
||||
auto s = lib->LoadScript(ScriptCategory::Creature, "testScript1");
|
||||
auto script = dynamic_cast<AngelScriptScript*>(s);
|
||||
auto ctxPool = script->GetContextPool();
|
||||
auto ctx = ctxPool->RequestContext();
|
||||
|
|
|
@ -42,7 +42,7 @@ static AngelScripResolver* GetScriptResolver(PkmnLib::Battling::BattleLibrary* m
|
|||
|
||||
static ScriptData GetScript(PkmnLib::Battling::BattleLibrary* mainLib, const char* funcName) {
|
||||
auto lib = GetScriptResolver(mainLib);
|
||||
auto s = lib->LoadScript(AngelScripResolver::ScriptCategory::Creature, "testScript1");
|
||||
auto s = lib->LoadScript(ScriptCategory::Creature, "testScript1");
|
||||
auto script = dynamic_cast<AngelScriptScript*>(s);
|
||||
auto ctxPool = script->GetContextPool();
|
||||
auto ctx = ctxPool->RequestContext();
|
||||
|
|
Loading…
Reference in New Issue