Merge remote-tracking branch 'origin/master' into new-buildsystem

This commit is contained in:
Lion Kortlepel
2023-12-05 17:59:05 +01:00
9 changed files with 70 additions and 18 deletions

View File

@@ -46,6 +46,7 @@ public:
std::string Resource { "Resources" };
std::string MapName { "/levels/gridmap_v2/info.json" };
std::string Key {};
std::string Password{};
std::string SSLKeyPath { "./.ssl/HttpServer/key.pem" };
std::string SSLCertPath { "./.ssl/HttpServer/cert.pem" };
bool HTTPServerEnabled { false };

View File

@@ -41,7 +41,14 @@ struct TLuaResult {
sol::object Result { sol::lua_nil };
TLuaStateId StateId;
std::string Function;
// TODO: Add condition_variable
std::shared_ptr<std::mutex> ReadyMutex {
std::make_shared<std::mutex>()
};
std::shared_ptr<std::condition_variable> ReadyCondition {
std::make_shared<std::condition_variable>()
};
void MarkAsReady();
void WaitUntilReady();
};
@@ -98,8 +105,8 @@ public:
return mLuaStates.size();
}
std::vector<std::string> GetLuaStateNames() {
std::vector<std::string> names{};
for(auto const& [stateId, _ ] : mLuaStates) {
std::vector<std::string> names {};
for (auto const& [stateId, _] : mLuaStates) {
names.push_back(stateId);
}
return names;

View File

@@ -52,4 +52,5 @@ private:
static const uint8_t* SendSplit(TClient& c, ip::tcp::socket& Socket, const uint8_t* DataPtr, size_t Size);
};
std::string HashPassword(const std::string& str);
std::vector<uint8_t> StringToVector(const std::string& Str);