finish rewrite, builds fully

This commit is contained in:
Lion Kortlepel
2021-02-17 00:46:18 +01:00
committed by Anonymous275
parent bf74b1ae32
commit d360403c56
16 changed files with 971 additions and 111 deletions

View File

@@ -11,7 +11,7 @@
class TLuaEngine : public IThreaded {
public:
explicit TLuaEngine(TServer& Server);
explicit TLuaEngine(TServer& Server, TTCPServer& TCPServer, TUDPServer& UDPServer);
using TSetOfLuaFile = std::set<std::unique_ptr<TLuaFile>>;
@@ -23,11 +23,16 @@ public:
std::optional<std::reference_wrapper<TLuaFile>> GetScript(lua_State* L);
TTCPServer& TCPServer() { return mTCPServer; }
TUDPServer& UDPServer() { return mUDPServer; }
private:
void FolderList(const std::string& Path, bool HotSwap);
void RegisterFiles(const std::string& Path, bool HotSwap);
bool NewFile(const std::string& Path);
TTCPServer& mTCPServer;
TUDPServer& mUDPServer;
TServer& mServer;
TSetOfLuaFile mLuaFiles;
};