mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 10:41:01 +00:00
Add basic autocomplete (fix #95)
This commit is contained in:
@@ -12,6 +12,7 @@ extern TSentry Sentry;
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <zlib.h>
|
||||
#include <filesystem>
|
||||
|
||||
#include "Compat.h"
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Common.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <filesystem>
|
||||
|
||||
#define TOML11_PRESERVE_COMMENTS_BY_DEFAULT
|
||||
#include <toml11/toml.hpp> // header-only version of TOML++
|
||||
|
||||
@@ -49,6 +49,7 @@ private:
|
||||
{ "list", [this](const auto& a, const auto& b) { Command_List(a, b); } },
|
||||
{ "status", [this](const auto& a, const auto& b) { Command_Status(a, b); } },
|
||||
{ "settings", [this](const auto& a, const auto& b) { Command_Settings(a, b); } },
|
||||
{ "say", [this](const auto& a, const auto& b) { Command_Say(""); } }, // shouldn't actually be called
|
||||
};
|
||||
|
||||
Commandline mCommandline;
|
||||
|
||||
@@ -154,6 +154,8 @@ public:
|
||||
|
||||
static constexpr const char* BeamMPFnNotFoundError = "BEAMMP_FN_NOT_FOUND";
|
||||
|
||||
std::vector<std::string> GetStateGlobalKeysForState(TLuaStateId StateId);
|
||||
|
||||
// Debugging functions (slow)
|
||||
std::unordered_map<std::string /*event name */, std::vector<std::string> /* handlers */> Debug_GetEventsForState(TLuaStateId StateId);
|
||||
std::queue<std::pair<TLuaChunk, std::shared_ptr<TLuaResult>>> Debug_GetStateExecuteQueueForState(TLuaStateId StateId);
|
||||
@@ -178,6 +180,8 @@ private:
|
||||
void operator()() override;
|
||||
sol::state_view State() { return sol::state_view(mState); }
|
||||
|
||||
std::vector<std::string> GetStateGlobalKeys();
|
||||
|
||||
// Debug functions, slow
|
||||
std::queue<std::pair<TLuaChunk, std::shared_ptr<TLuaResult>>> Debug_GetStateExecuteQueue();
|
||||
std::queue<std::tuple<std::string, std::shared_ptr<TLuaResult>, std::vector<TLuaArgTypes>>> Debug_GetStateFunctionQueue();
|
||||
|
||||
Reference in New Issue
Block a user