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

66 lines
1.7 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
2021-02-17 22:56:14 +01:00
#include "context.hpp"
2020-12-18 23:21:10 +01:00
#include "eventqueue.hpp"
#include "object.hpp"
2021-02-17 22:56:14 +01:00
#include "query.hpp"
2020-12-18 23:21:10 +01:00
#include "worldview.hpp"
2021-04-17 11:50:20 +02:00
namespace MWWorld
{
class CellStore;
}
2020-12-18 23:21:10 +01:00
namespace MWLua
{
sol::table initCorePackage(const Context&);
sol::table initWorldPackage(const Context&);
sol::table initNearbyPackage(const Context&);
2021-02-17 22:56:14 +01:00
sol::table initQueryPackage(const Context&);
sol::table initFieldGroup(const Context&, const QueryFieldGroup&);
2020-12-18 23:21:10 +01:00
2021-07-09 20:18:23 +02:00
void initInputBindings(const Context&);
2020-12-18 23:21:10 +01:00
// Implemented in objectbindings.cpp
void initObjectBindingsForLocalScripts(const Context&);
void initObjectBindingsForGlobalScripts(const Context&);
2021-04-17 11:50:20 +02:00
// Implemented in cellbindings.cpp
struct LCell // for local scripts
{
MWWorld::CellStore* mStore;
};
struct GCell // for global scripts
{
MWWorld::CellStore* mStore;
};
void initCellBindingsForLocalScripts(const Context&);
void initCellBindingsForGlobalScripts(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&);
2021-01-29 01:54:54 +01:00
// Implemented in camerabindings.cpp
sol::table initCameraPackage(const Context&);
// Implemented in uibindings.cpp
sol::table initUserInterfacePackage(const Context&);
2020-12-18 23:21:10 +01:00
// openmw.self package is implemented in localscripts.cpp
}
#endif // MWLUA_LUABINDINGS_H