#pragma once #include "TNetwork.h" #include "TServer.h" #include #include #include #include #include namespace fs = std::filesystem; class TLuaPlugin; class TLuaEngine : IThreaded { public: TLuaEngine(TServer& Server, TNetwork& Network); void operator()() override; private: void CollectPlugins(); void InitializePlugin(const fs::path& folder); TNetwork& mNetwork; TServer& mServer; sol::state mL; std::atomic_bool mShutdown { false }; fs::path mResourceServerPath; std::vector mLuaPlugins; std::unordered_map mLuaStates; };