mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-02 07:45:26 +00:00
Continue Lua Rewrite
This commit is contained in:
parent
c309fa28c6
commit
ba0678dade
@ -52,16 +52,19 @@ target_include_directories(BeamMP-Server PRIVATE "${PROJECT_SOURCE_DIR}/deps/com
|
|||||||
target_include_directories(BeamMP-Server PRIVATE "${PROJECT_SOURCE_DIR}/deps/sol2/include")
|
target_include_directories(BeamMP-Server PRIVATE "${PROJECT_SOURCE_DIR}/deps/sol2/include")
|
||||||
target_include_directories(BeamMP-Server PRIVATE "${PROJECT_SOURCE_DIR}/deps")
|
target_include_directories(BeamMP-Server PRIVATE "${PROJECT_SOURCE_DIR}/deps")
|
||||||
|
|
||||||
include_directories(BeamMP-Server PUBLIC ${Boost_INCLUDE_DIRS} ${LUA_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
include_directories(BeamMP-Server PUBLIC ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
|
find_package(Lua REQUIRED)
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
|
||||||
|
target_link_libraries(BeamMP-Server sol2::sol2 ${LUA_LIBRARIES})
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_link_libraries(BeamMP-Server z pthread stdc++fs ${SOL2_LIBRARIES} crypto ${OPENSSL_LIBRARIES} commandline sioclient_tls)
|
target_link_libraries(BeamMP-Server z pthread stdc++fs crypto ${OPENSSL_LIBRARIES} commandline sioclient_tls)
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
include(FindLua)
|
include(FindLua)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
find_package(RapidJSON CONFIG REQUIRED)
|
find_package(RapidJSON CONFIG REQUIRED)
|
||||||
target_include_directories(BeamMP-Server PRIVATE ${RAPIDJSON_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
|
target_include_directories(BeamMP-Server PRIVATE ${RAPIDJSON_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
|
||||||
target_link_libraries(BeamMP-Server PRIVATE ws2_32 ZLIB::ZLIB ${SOL2_LIBRARIES} ${OPENSSL_LIBRARIES} commandline sioclient_tls)
|
target_link_libraries(BeamMP-Server PRIVATE ws2_32 ZLIB::ZLIB ${OPENSSL_LIBRARIES} commandline sioclient_tls)
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -56,13 +56,13 @@ inline void _assert([[maybe_unused]] const char* file, [[maybe_unused]] const ch
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define beammp_assert(cond) _assert(__FILE__, __func__, __LINE__, #cond, (cond))
|
#define beammp_assert(cond) _assert(__FILE__, __func__, __LINE__, #cond, (cond))
|
||||||
#define AssertNotReachable() _assert(__FILE__, __func__, __LINE__, "reached unreachable code", false)
|
#define beammp_assert_not_reachable() _assert(__FILE__, __func__, __LINE__, "reached unreachable code", false)
|
||||||
#else
|
#else
|
||||||
// In release build, these macros turn into NOPs. The compiler will optimize these out.
|
// In release build, these macros turn into NOPs. The compiler will optimize these out.
|
||||||
#define Assert(x) \
|
#define beammp_assert(x) \
|
||||||
do { \
|
do { \
|
||||||
} while (false)
|
} while (false)
|
||||||
#define AssertNotReachable() \
|
#define beammp_assert_not_reachable() \
|
||||||
do { \
|
do { \
|
||||||
} while (false)
|
} while (false)
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
class TConfig {
|
class TConfig {
|
||||||
public:
|
public:
|
||||||
explicit TConfig();
|
explicit TConfig();
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "commandline.h"
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "commandline.h"
|
|
||||||
|
class TLuaEngine;
|
||||||
|
|
||||||
class TConsole {
|
class TConsole {
|
||||||
public:
|
public:
|
||||||
@ -10,9 +12,10 @@ public:
|
|||||||
|
|
||||||
void Write(const std::string& str);
|
void Write(const std::string& str);
|
||||||
void WriteRaw(const std::string& str);
|
void WriteRaw(const std::string& str);
|
||||||
// BROKEN void InitializeLuaConsole(TLuaEngine& Engine);
|
void InitializeLuaConsole(TLuaEngine& Engine);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// BROKEN std::unique_ptr<TLuaFile> mLuaConsole { nullptr };
|
|
||||||
Commandline mCommandline;
|
Commandline mCommandline;
|
||||||
|
TLuaEngine& mLuaEngine;
|
||||||
|
const std::string mStateId = "BEAMMP_SERVER_CONSOLE";
|
||||||
};
|
};
|
||||||
|
@ -3,30 +3,77 @@
|
|||||||
#include "TNetwork.h"
|
#include "TNetwork.h"
|
||||||
#include "TServer.h"
|
#include "TServer.h"
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <sol/sol.hpp>
|
#include <memory>
|
||||||
|
#include <mutex>
|
||||||
|
#include <queue>
|
||||||
#include <toml11/toml.hpp>
|
#include <toml11/toml.hpp>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#define SOL_ALL_SAFETIES_ON 1
|
||||||
|
#include <sol/sol.hpp>
|
||||||
|
|
||||||
|
using TLuaStateId = std::string;
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
class TLuaPlugin;
|
class TLuaPlugin;
|
||||||
|
|
||||||
|
struct TLuaResult {
|
||||||
|
std::atomic_bool Ready;
|
||||||
|
// TODO: Add condition_variable
|
||||||
|
sol::protected_function_result Result;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TLuaPluginConfig {
|
||||||
|
static inline const std::string FileName = "PluginConfig.toml";
|
||||||
|
TLuaStateId StateId;
|
||||||
|
// TODO: Execute list
|
||||||
|
};
|
||||||
|
|
||||||
class TLuaEngine : IThreaded {
|
class TLuaEngine : IThreaded {
|
||||||
public:
|
public:
|
||||||
TLuaEngine(TServer& Server, TNetwork& Network);
|
TLuaEngine(TServer& Server, TNetwork& Network);
|
||||||
|
|
||||||
void operator()() override;
|
void operator()() override;
|
||||||
|
|
||||||
|
TLuaResult EnqueueScript(TLuaStateId StateID, const std::shared_ptr<std::string>& Script);
|
||||||
|
void EnsureStateExists(TLuaStateId StateId, const std::string& Name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CollectPlugins();
|
void CollectPlugins();
|
||||||
void InitializePlugin(const fs::path& folder);
|
void InitializePlugin(const fs::path& Folder, const TLuaPluginConfig& Config);
|
||||||
|
void FindAndParseConfig(const fs::path& Folder, TLuaPluginConfig& Config);
|
||||||
|
|
||||||
|
class StateThreadData : IThreaded {
|
||||||
|
public:
|
||||||
|
StateThreadData(const std::string& Name, std::atomic_bool& Shutdown);
|
||||||
|
StateThreadData(const StateThreadData&) = delete;
|
||||||
|
void EnqueueScript(const std::shared_ptr<std::string>& Script);
|
||||||
|
void operator()() override;
|
||||||
|
~StateThreadData();
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string mName;
|
||||||
|
std::atomic_bool& mShutdown;
|
||||||
|
sol::state mState;
|
||||||
|
std::thread mThread;
|
||||||
|
std::queue<std::shared_ptr<std::string>> mStateExecuteQueue;
|
||||||
|
std::mutex mStateExecuteQueueMutex;
|
||||||
|
};
|
||||||
|
|
||||||
TNetwork& mNetwork;
|
TNetwork& mNetwork;
|
||||||
TServer& mServer;
|
TServer& mServer;
|
||||||
sol::state mL;
|
|
||||||
std::atomic_bool mShutdown { false };
|
std::atomic_bool mShutdown { false };
|
||||||
fs::path mResourceServerPath;
|
fs::path mResourceServerPath;
|
||||||
std::vector<TLuaPlugin> mLuaPlugins;
|
std::vector<TLuaPlugin*> mLuaPlugins;
|
||||||
std::unordered_map<std::string, sol::state> mLuaStates;
|
std::unordered_map<TLuaStateId, std::unique_ptr<StateThreadData>> mLuaStates;
|
||||||
|
std::mutex mLuaStatesMutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include <any>
|
||||||
|
// DEAD CODE
|
||||||
|
struct TLuaArg {
|
||||||
|
std::vector<std::any> args;
|
||||||
|
void PushArgs(lua_State* State);
|
||||||
|
};
|
||||||
|
std::any TriggerLuaEvent(const std::string& Event, bool local, TLuaPlugin* Caller, std::shared_ptr<TLuaArg> arg, bool Wait);
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
#include "TLuaEngine.h"
|
||||||
|
|
||||||
|
class TLuaPlugin {
|
||||||
|
public:
|
||||||
|
TLuaPlugin(TLuaEngine& Engine, const TLuaPluginConfig& Config);
|
||||||
|
TLuaPlugin(const TLuaPlugin&) = delete;
|
||||||
|
TLuaPlugin& operator=(const TLuaPlugin&) = delete;
|
||||||
|
~TLuaPlugin() noexcept = default;
|
||||||
|
|
||||||
|
const TLuaPluginConfig& GetConfig() const { return mConfig; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
TLuaPluginConfig mConfig;
|
||||||
|
TLuaEngine& mEngine;
|
||||||
|
};
|
@ -2,6 +2,8 @@
|
|||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "Compat.h"
|
#include "Compat.h"
|
||||||
|
|
||||||
|
#include "TLuaEngine.h"
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@ -55,13 +57,8 @@ TConsole::TConsole() {
|
|||||||
Application::GracefullyShutdown();
|
Application::GracefullyShutdown();
|
||||||
} else if (cmd == "clear" || cmd == "cls") {
|
} else if (cmd == "clear" || cmd == "cls") {
|
||||||
// TODO: clear screen
|
// TODO: clear screen
|
||||||
|
mLuaEngine.EnqueueScript(mStateId, std::make_shared<std::string>(cmd));
|
||||||
} else {
|
} else {
|
||||||
/*if (mLuaConsole) {
|
|
||||||
mLuaConsole->Execute(cmd);
|
|
||||||
} else {
|
|
||||||
error("Lua subsystem not yet initialized, please wait a few seconds and try again");
|
|
||||||
} BROKEN
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -71,11 +68,11 @@ void TConsole::Write(const std::string& str) {
|
|||||||
mCommandline.write(ToWrite);
|
mCommandline.write(ToWrite);
|
||||||
// TODO write to logfile, too
|
// TODO write to logfile, too
|
||||||
}
|
}
|
||||||
/* BROKEN
|
|
||||||
void TConsole::InitializeLuaConsole(TLuaEngine& Engine) {
|
|
||||||
mLuaConsole = std::make_unique<TLuaFile>(Engine, true);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
void TConsole::WriteRaw(const std::string& str) {
|
void TConsole::WriteRaw(const std::string& str) {
|
||||||
mCommandline.write(str);
|
mCommandline.write(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TConsole::InitializeLuaConsole(TLuaEngine& Engine) {
|
||||||
|
Engine.EnsureStateExists(mStateId, "<>");
|
||||||
|
}
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
#include "TLuaEngine.h"
|
#include "TLuaEngine.h"
|
||||||
#include "CustomAssert.h"
|
#include "CustomAssert.h"
|
||||||
|
#include "TLuaPlugin.h"
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
#include <random>
|
||||||
|
|
||||||
|
static std::mt19937_64 MTGen64;
|
||||||
|
|
||||||
|
static TLuaStateId GenerateUniqueStateId() {
|
||||||
|
auto Time = std::chrono::high_resolution_clock::now().time_since_epoch();
|
||||||
|
return std::to_string(MTGen64()) + std::to_string(std::chrono::duration_cast<std::chrono::nanoseconds>(Time).count());
|
||||||
|
}
|
||||||
|
|
||||||
TLuaEngine::TLuaEngine(TServer& Server, TNetwork& Network)
|
TLuaEngine::TLuaEngine(TServer& Server, TNetwork& Network)
|
||||||
: mNetwork(Network)
|
: mNetwork(Network)
|
||||||
@ -18,27 +29,114 @@ TLuaEngine::TLuaEngine(TServer& Server, TNetwork& Network)
|
|||||||
mThread.join();
|
mThread.join();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TLuaEngine::operator()() {
|
void TLuaEngine::operator()() {
|
||||||
RegisterThread("LuaEngine");
|
RegisterThread("LuaEngine");
|
||||||
// lua engine main thread
|
// lua engine main thread
|
||||||
CollectPlugins();
|
CollectPlugins();
|
||||||
|
while (!mShutdown) {
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TLuaEngine::EnqueueScript(TLuaStateId StateID, const std::shared_ptr<std::string>& Script) {
|
||||||
|
std::unique_lock Lock(mLuaStatesMutex);
|
||||||
|
mLuaStates.at(StateID)->EnqueueScript(Script);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TLuaEngine::CollectPlugins() {
|
void TLuaEngine::CollectPlugins() {
|
||||||
for (const auto& dir : fs::directory_iterator(mResourceServerPath)) {
|
for (const auto& Dir : fs::directory_iterator(mResourceServerPath)) {
|
||||||
auto path = dir.path();
|
auto Path = Dir.path();
|
||||||
path = fs::relative(path);
|
Path = fs::relative(Path);
|
||||||
if (!dir.is_directory()) {
|
if (!Dir.is_directory()) {
|
||||||
beammp_error("\"" + dir.path().string() + "\" is not a directory, skipping");
|
beammp_error("\"" + Dir.path().string() + "\" is not a directory, skipping");
|
||||||
} else {
|
} else {
|
||||||
beammp_debug("found plugin directory: " + path.string());
|
beammp_debug("found plugin directory: " + Path.string());
|
||||||
|
TLuaPluginConfig Config { GenerateUniqueStateId() };
|
||||||
|
FindAndParseConfig(Path, Config);
|
||||||
|
InitializePlugin(Path, Config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TLuaEngine::InitializePlugin(const fs::path& folder) {
|
void TLuaEngine::InitializePlugin(const fs::path& Folder, const TLuaPluginConfig& Config) {
|
||||||
beammp_assert(fs::exists(folder));
|
beammp_assert(fs::exists(Folder));
|
||||||
beammp_assert(fs::is_directory(folder));
|
beammp_assert(fs::is_directory(Folder));
|
||||||
|
TLuaPlugin Plugin(*this, Config);
|
||||||
|
std::unique_lock Lock(mLuaStatesMutex);
|
||||||
|
EnsureStateExists(Config.StateId, Folder.stem().string());
|
||||||
|
}
|
||||||
|
|
||||||
|
void TLuaEngine::FindAndParseConfig(const fs::path& Folder, TLuaPluginConfig& Config) {
|
||||||
|
auto ConfigFile = Folder / TLuaPluginConfig::FileName;
|
||||||
|
if (fs::exists(ConfigFile) && fs::is_regular_file(ConfigFile)) {
|
||||||
|
beammp_debug("\"" + ConfigFile.string() + "\" found");
|
||||||
|
// TODO use toml11 here to parse it
|
||||||
|
try {
|
||||||
|
auto Data = toml::parse(ConfigFile);
|
||||||
|
if (Data.contains("LuaStateID")) {
|
||||||
|
auto ID = toml::find<std::string>(Data, "LuaStateID");
|
||||||
|
if (!ID.empty()) {
|
||||||
|
beammp_debug("Plugin \"" + Folder.string() + "\" specified it wants LuaStateID \"" + ID + "\"");
|
||||||
|
Config.StateId = ID;
|
||||||
|
} else {
|
||||||
|
beammp_debug("LuaStateID empty, using randomized state ID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (const std::exception& e) {
|
||||||
|
beammp_error(Folder.string() + ": " + e.what());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TLuaEngine::EnsureStateExists(TLuaStateId StateId, const std::string& Name) {
|
||||||
|
if (mLuaStates.find(StateId) == mLuaStates.end()) {
|
||||||
|
beammp_debug("Creating lua state for state id \"" + StateId + "\"");
|
||||||
|
auto DataPtr = std::make_unique<StateThreadData>(Name, mShutdown);
|
||||||
|
mLuaStates[StateId] = std::move(DataPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TLuaEngine::StateThreadData::StateThreadData(const std::string& Name, std::atomic_bool& Shutdown)
|
||||||
|
: mName(Name)
|
||||||
|
, mShutdown(Shutdown) {
|
||||||
|
mState.open_libraries(sol::lib::base);
|
||||||
|
Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TLuaEngine::StateThreadData::EnqueueScript(const std::shared_ptr<std::string>& Script) {
|
||||||
|
beammp_debug("enqueuing script into \"" + mName + "\"");
|
||||||
|
std::unique_lock Lock(mStateExecuteQueueMutex);
|
||||||
|
mStateExecuteQueue.push(Script);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TLuaEngine::StateThreadData::operator()() {
|
||||||
|
RegisterThreadAuto();
|
||||||
|
while (!mShutdown) {
|
||||||
|
std::unique_lock Lock(mStateExecuteQueueMutex);
|
||||||
|
if (mStateExecuteQueue.empty()) {
|
||||||
|
Lock.unlock();
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
|
} else {
|
||||||
|
auto S = mStateExecuteQueue.front();
|
||||||
|
mStateExecuteQueue.pop();
|
||||||
|
Lock.unlock();
|
||||||
|
mState.do_string(*S);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TLuaEngine::StateThreadData::~StateThreadData() {
|
||||||
|
if (mThread.joinable()) {
|
||||||
|
mThread.join();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// AHHH
|
||||||
|
std::any TriggerLuaEvent(const std::string& Event, bool local, TLuaPlugin* Caller, std::shared_ptr<TLuaArg> arg, bool Wait) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void TLuaArg::PushArgs(lua_State* State) {
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
#include "TLuaPlugin.h"
|
||||||
|
#include <chrono>
|
||||||
|
#include <functional>
|
||||||
|
#include <random>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
TLuaPlugin::TLuaPlugin(TLuaEngine& Engine, const TLuaPluginConfig& Config)
|
||||||
|
: mConfig(Config)
|
||||||
|
, mEngine(Engine) {
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
#include "Client.h"
|
#include "Client.h"
|
||||||
#include <CustomAssert.h>
|
#include <CustomAssert.h>
|
||||||
#include <Http.h>
|
#include <Http.h>
|
||||||
|
#include <TLuaPlugin.h>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ void TNetwork::UDPServerMain() {
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
WSADATA data;
|
WSADATA data;
|
||||||
if (WSAStartup(514, &data)) {
|
if (WSAStartup(514, &data)) {
|
||||||
error(("Can't start Winsock!"));
|
beammp_error(("Can't start Winsock!"));
|
||||||
//return;
|
//return;
|
||||||
}
|
}
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
@ -104,7 +105,7 @@ void TNetwork::TCPServerMain() {
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
if (WSAStartup(514, &wsaData)) {
|
if (WSAStartup(514, &wsaData)) {
|
||||||
error("Can't start Winsock!");
|
beammp_error("Can't start Winsock!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
@ -621,7 +622,7 @@ void TNetwork::SyncResources(TClient& c) {
|
|||||||
}
|
}
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
error("Exception! : " + std::string(e.what()));
|
beammp_error("Exception! : " + std::string(e.what()));
|
||||||
c.SetStatus(-1);
|
c.SetStatus(-1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "TNetwork.h"
|
#include "TNetwork.h"
|
||||||
#include "TPPSMonitor.h"
|
#include "TPPSMonitor.h"
|
||||||
#include <TLuaFile.h>
|
#include <TLuaPlugin.h>
|
||||||
#include <any>
|
#include <any>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ int main(int argc, char** argv) {
|
|||||||
TNetwork Network(Server, PPSMonitor, ResourceManager);
|
TNetwork Network(Server, PPSMonitor, ResourceManager);
|
||||||
TLuaEngine LuaEngine(Server, Network);
|
TLuaEngine LuaEngine(Server, Network);
|
||||||
PPSMonitor.SetNetwork(Network);
|
PPSMonitor.SetNetwork(Network);
|
||||||
Application::Console().InitializeLuaConsole(LuaEngine);
|
// BROKEN Application::Console().InitializeLuaConsole(LuaEngine);
|
||||||
|
|
||||||
// TODO: replace
|
// TODO: replace
|
||||||
while (!Shutdown) {
|
while (!Shutdown) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user