|
|
@ -31,6 +31,7 @@ namespace MWLua
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto* lua = context.mLua;
|
|
|
|
auto* lua = context.mLua;
|
|
|
|
sol::table api(lua->sol(), sol::create);
|
|
|
|
sol::table api(lua->sol(), sol::create);
|
|
|
|
|
|
|
|
api["API_VERSION"] = 0;
|
|
|
|
api["sendGlobalEvent"] = [context](std::string eventName, const sol::object& eventData)
|
|
|
|
api["sendGlobalEvent"] = [context](std::string eventName, const sol::object& eventData)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
context.mGlobalEventQueue->push_back({std::move(eventName), LuaUtil::serialize(eventData, context.mSerializer)});
|
|
|
|
context.mGlobalEventQueue->push_back({std::move(eventName), LuaUtil::serialize(eventData, context.mSerializer)});
|
|
|
|