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
|
|
|
|
|
|
|
// 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&);
|
|
|
|
|
2021-06-26 23:10:24 +02:00
|
|
|
// Implemented in inputbindings.cpp
|
|
|
|
sol::table initInputPackage(const Context&);
|
|
|
|
|
2021-06-01 23:18:42 +02:00
|
|
|
// Implemented in settingsbindings.cpp
|
|
|
|
sol::table initGlobalSettingsPackage(const Context&);
|
|
|
|
sol::table initLocalSettingsPackage(const Context&);
|
|
|
|
sol::table initPlayerSettingsPackage(const Context&);
|
|
|
|
|
2020-12-18 23:21:10 +01:00
|
|
|
// openmw.self package is implemented in localscripts.cpp
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // MWLUA_LUABINDINGS_H
|