1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/openmw/mwlua/luabindings.hpp

47 lines
1.2 KiB
C++
Raw Normal View History

2020-12-18 23:21:10 +01:00
#ifndef MWLUA_LUABINDINGS_H
#define MWLUA_LUABINDINGS_H
#include <components/lua/luastate.hpp>
#include <components/lua/serialization.hpp>
2021-03-12 18:29:51 +01:00
#include <components/lua/scriptscontainer.hpp>
2020-12-18 23:21:10 +01:00
#include "eventqueue.hpp"
#include "object.hpp"
#include "worldview.hpp"
namespace MWLua
{
class LuaManager;
struct Context
{
LuaManager* mLuaManager;
LuaUtil::LuaState* mLua;
LuaUtil::UserdataSerializer* mSerializer;
WorldView* mWorldView;
LocalEventQueue* mLocalEventQueue;
GlobalEventQueue* mGlobalEventQueue;
};
sol::table initCorePackage(const Context&);
sol::table initWorldPackage(const Context&);
sol::table initNearbyPackage(const Context&);
// Implemented in objectbindings.cpp
void initObjectBindingsForLocalScripts(const Context&);
void initObjectBindingsForGlobalScripts(const Context&);
2021-03-12 18:29:51 +01:00
// Implemented in asyncbindings.cpp
struct AsyncPackageId
{
// TODO: add ObjectId mLocalObject;
LuaUtil::ScriptsContainer* mContainer;
std::string mScript;
};
sol::function getAsyncPackageInitializer(const Context&);
2020-12-18 23:21:10 +01:00
// openmw.self package is implemented in localscripts.cpp
}
#endif // MWLUA_LUABINDINGS_H