diff --git a/src/ScriptResolving/AngelScript/AngelScripResolver.cpp b/src/ScriptResolving/AngelScript/AngelScripResolver.cpp index bf7009d..9be2811 100644 --- a/src/ScriptResolving/AngelScript/AngelScripResolver.cpp +++ b/src/ScriptResolving/AngelScript/AngelScripResolver.cpp @@ -5,6 +5,7 @@ #include "../../../extern/angelscript_addons/scripthandle/scripthandle.h" #include "../../../extern/angelscript_addons/scripthelper/scripthelper.h" #include "../../../extern/angelscript_addons/scriptstdstring/scriptstdstring.h" +#include "../../Battling/PkmnScriptCategory.hpp" #include "ByteCodeHandling/FileByteCodeStream.hpp" #include "ByteCodeHandling/MemoryByteCodeStream.hpp" #include "TypeRegistry/BasicScriptClass.hpp" @@ -43,6 +44,9 @@ void AngelScripResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg) { for (auto scriptCategory : ScriptCategoryHelper::GetValues()) { _typeDatabase.Insert(scriptCategory, {}); } + for (auto scriptCategory : PkmnScriptCategoryHelper::GetValues()) { + _typeDatabase.Insert(static_cast(scriptCategory), {}); + } auto library = (PkmnLib::Battling::BattleLibrary*)arg; _engine = asCreateScriptEngine(); @@ -186,6 +190,9 @@ void AngelScripResolver::FinalizeModule() { } else if (metadataKind == "Side") { _typeDatabase[ScriptCategory::Side].Insert(effectName, new AngelScriptTypeInfo(effectName, typeInfo)); + } else if (metadataKind == "Weather") { + _typeDatabase[static_cast(PkmnScriptCategory::Weather)].Insert(effectName, + new AngelScriptTypeInfo(effectName, typeInfo)); } } }