Ensure AngelScript allows resolving PkmnScriptCategory categories.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
c6d31e09a1
commit
6955c2c69f
|
@ -5,6 +5,7 @@
|
||||||
#include "../../../extern/angelscript_addons/scripthandle/scripthandle.h"
|
#include "../../../extern/angelscript_addons/scripthandle/scripthandle.h"
|
||||||
#include "../../../extern/angelscript_addons/scripthelper/scripthelper.h"
|
#include "../../../extern/angelscript_addons/scripthelper/scripthelper.h"
|
||||||
#include "../../../extern/angelscript_addons/scriptstdstring/scriptstdstring.h"
|
#include "../../../extern/angelscript_addons/scriptstdstring/scriptstdstring.h"
|
||||||
|
#include "../../Battling/PkmnScriptCategory.hpp"
|
||||||
#include "ByteCodeHandling/FileByteCodeStream.hpp"
|
#include "ByteCodeHandling/FileByteCodeStream.hpp"
|
||||||
#include "ByteCodeHandling/MemoryByteCodeStream.hpp"
|
#include "ByteCodeHandling/MemoryByteCodeStream.hpp"
|
||||||
#include "TypeRegistry/BasicScriptClass.hpp"
|
#include "TypeRegistry/BasicScriptClass.hpp"
|
||||||
|
@ -43,6 +44,9 @@ void AngelScripResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg) {
|
||||||
for (auto scriptCategory : ScriptCategoryHelper::GetValues()) {
|
for (auto scriptCategory : ScriptCategoryHelper::GetValues()) {
|
||||||
_typeDatabase.Insert(scriptCategory, {});
|
_typeDatabase.Insert(scriptCategory, {});
|
||||||
}
|
}
|
||||||
|
for (auto scriptCategory : PkmnScriptCategoryHelper::GetValues()) {
|
||||||
|
_typeDatabase.Insert(static_cast<ScriptCategory>(scriptCategory), {});
|
||||||
|
}
|
||||||
|
|
||||||
auto library = (PkmnLib::Battling::BattleLibrary*)arg;
|
auto library = (PkmnLib::Battling::BattleLibrary*)arg;
|
||||||
_engine = asCreateScriptEngine();
|
_engine = asCreateScriptEngine();
|
||||||
|
@ -186,6 +190,9 @@ void AngelScripResolver::FinalizeModule() {
|
||||||
} else if (metadataKind == "Side") {
|
} else if (metadataKind == "Side") {
|
||||||
_typeDatabase[ScriptCategory::Side].Insert(effectName,
|
_typeDatabase[ScriptCategory::Side].Insert(effectName,
|
||||||
new AngelScriptTypeInfo(effectName, typeInfo));
|
new AngelScriptTypeInfo(effectName, typeInfo));
|
||||||
|
} else if (metadataKind == "Weather") {
|
||||||
|
_typeDatabase[static_cast<ScriptCategory>(PkmnScriptCategory::Weather)].Insert(effectName,
|
||||||
|
new AngelScriptTypeInfo(effectName, typeInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue