add lua engine, lua file, server, client, vehicle data, other stuff

This commit is contained in:
Lion Kortlepel authored and Anonymous275 committed 2021-03-18 23:44:14 +02:00
1 parent e5e447c7af
commit 459814a6ec
21 files changed
+1537 -14

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#ifndef TLUAENGINE_H
#define TLUAENGINE_H
#include "Common.h"
#include "IThreaded.h"
#include <lua.hpp>
#include <memory>
#include <set>
class TLuaFile;
class TLuaEngine : public IThreaded {
public:
using TSetOfLuaFile = std::set<std::unique_ptr<TLuaFile>>;
TLuaEngine();
virtual void operator()() override;
const TSetOfLuaFile& LuaFiles() const { return _LuaFiles; }
std::optional<std::reference_wrapper<TLuaFile>> GetScript(lua_State* L);
private:
void FolderList(const std::string& Path, bool HotSwap);
void RegisterFiles(const std::string& Path, bool HotSwap);
bool NewFile(const std::string& Path);
TSetOfLuaFile _LuaFiles;
};
#endif // TLUAENGINE_H