[Main]: Improve error message
This commit is contained in:
@ -56,7 +56,7 @@ namespace Components
|
||||
|
||||
UIScript::Add("visitWebsite", []([[maybe_unused]] const UIScript::Token& token, [[maybe_unused]] const Game::uiInfo_s* info)
|
||||
{
|
||||
Utils::OpenUrl(Utils::Cache::GetStaticUrl(""));
|
||||
Utils::OpenUrl(Utils::Cache::GetUrl(Utils::Cache::Urls[1], {}));
|
||||
});
|
||||
|
||||
Localization::Set("MPUI_CHANGELOG_TEXT", "Loading...");
|
||||
|
@ -50,20 +50,6 @@ namespace Components
|
||||
this->lastRequest.reset();
|
||||
}
|
||||
|
||||
void Node::LoadNodeRemotePreset()
|
||||
{
|
||||
std::string nodes = Utils::Cache::GetFile("/iw4/nodes.txt");
|
||||
if (nodes.empty()) return;
|
||||
|
||||
auto nodeList = Utils::String::Split(nodes, '\n');
|
||||
for (auto& node : nodeList)
|
||||
{
|
||||
Utils::String::Replace(node, "\r", "");
|
||||
Utils::String::Trim(node);
|
||||
Node::Add(node);
|
||||
}
|
||||
}
|
||||
|
||||
void Node::LoadNodePreset()
|
||||
{
|
||||
Proto::Node::List list;
|
||||
@ -350,14 +336,6 @@ namespace Components
|
||||
|
||||
Scheduler::OnGameInitialized(loadNodes, Scheduler::Pipeline::MAIN);
|
||||
|
||||
Network::OnStart([]
|
||||
{
|
||||
std::thread([]
|
||||
{
|
||||
Node::LoadNodeRemotePreset();
|
||||
}).detach();
|
||||
});
|
||||
|
||||
Command::Add("listnodes", [](Command::Params*)
|
||||
{
|
||||
Logger::Print("Nodes: {}\n", Node::Nodes.size());
|
||||
|
@ -41,8 +41,6 @@ namespace Components
|
||||
static void RunFrame();
|
||||
static void Synchronize();
|
||||
|
||||
static void LoadNodeRemotePreset();
|
||||
|
||||
private:
|
||||
static std::recursive_mutex Mutex;
|
||||
static std::vector<Entry> Nodes;
|
||||
|
Reference in New Issue
Block a user