Files
ashlar/apps/openmw/mwlua/contentbindings.hpp
2026-03-01 20:58:14 +01:00

28 lines
544 B
C++

#ifndef MWLUA_CONTENTBINDINGS_H
#define MWLUA_CONTENTBINDINGS_H
#include <sol/forward.hpp>
#include <components/esm/refid.hpp>
#include "../mwworld/store.hpp"
namespace MWLua
{
struct Context;
template <class T>
struct MutableRecord
{
MWWorld::Store<T>& mStore;
ESM::RefId mId;
const T& find() const { return *mStore.find(mId); }
T& find() { return *const_cast<T*>(mStore.find(mId)); }
};
sol::table initContentPackage(const Context& context);
}
#endif // MWLUA_CONTENTBINDINGS_H