Updates Angelscript addons, adds angelscript dictionary addon.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "AngelScriptResolver.hpp"
|
||||
#include <CreatureLib/Battling/Models/Creature.hpp>
|
||||
#include <regex>
|
||||
#include "../../../extern/angelscript_addons/scriptdictionary/scriptdictionary.h"
|
||||
#include "../../../extern/angelscript_addons/scripthandle/scripthandle.h"
|
||||
#include "../../../extern/angelscript_addons/scripthelper/scripthelper.h"
|
||||
#include "../../../extern/angelscript_addons/scriptstdstring/scriptstdstring.h"
|
||||
@@ -35,7 +36,7 @@ static void TranslateException(asIScriptContext* ctx, void* /*userParam*/) {
|
||||
} catch (ArbUt::Exception& e) {
|
||||
// Tell the VM the type of exception that occurred
|
||||
ctx->SetException(e.what());
|
||||
}catch (std::exception& e) {
|
||||
} catch (std::exception& e) {
|
||||
// Tell the VM the type of exception that occurred
|
||||
ctx->SetException(e.what());
|
||||
} catch (...) {
|
||||
@@ -76,6 +77,7 @@ void AngelScriptResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg,
|
||||
// Register Script Array type
|
||||
RegisterScriptArray(_engine, true);
|
||||
RegisterScriptHandle(_engine);
|
||||
RegisterScriptDictionary(_engine);
|
||||
r = _engine->RegisterGlobalFunction("void print(const string &in)", asFUNCTION(Print), asCALL_CDECL);
|
||||
if (r < 0)
|
||||
throw ArbUt::Exception("Registering print function failed.");
|
||||
|
||||
Reference in New Issue
Block a user