Fully working lua_Register

This commit is contained in:
Anonymous-275
2021-06-27 14:28:16 +03:00
committed by Lion Kortlepel
parent 2cfb27820a
commit 2be4b8fd91
3 changed files with 21 additions and 22 deletions

View File

@@ -4,10 +4,11 @@
#include "IThreaded.h"
#include "TLuaFile.h"
#include "TServer.h"
#include <optional>
#include <lua.hpp>
#include <memory>
#include <optional>
#include <set>
#include <unordered_map>
class TLuaEngine : public IThreaded {
public:
@@ -25,6 +26,7 @@ public:
std::optional<std::reference_wrapper<TLuaFile>> GetScript(lua_State* L);
static std::unordered_map<std::string, lua_State*> mGlobals;
private:
void FolderList(const std::string& Path, bool HotSwap);
void RegisterFiles(const fs::path& Path, bool HotSwap);