From 56614444147afa9379877e591174a4ece7a54f32 Mon Sep 17 00:00:00 2001 From: Michael Tyson Date: Tue, 23 Apr 2024 16:53:29 +1000 Subject: [PATCH] =?UTF-8?q?Removed=20=E2=80=9C--name=E2=80=9D=20flag=20in?= =?UTF-8?q?=20favour=20of=20specifying=20offline=20player=20name=20via=20?= =?UTF-8?q?=E2=80=9C--offline=E2=80=9D=20flag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Tyson --- launcher/Application.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/launcher/Application.cpp b/launcher/Application.cpp index e48ed73f0..7e85938ce 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -242,10 +242,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv) { { "s", "server" }, "Join the specified server on launch (only valid in combination with --launch)", "address" }, { { "w", "world" }, "Join the specified world on launch (only valid in combination with --launch)", "world" }, { { "a", "profile" }, "Use the account specified by its profile name (only valid in combination with --launch)", "profile" }, - { { "o", "offline" }, "Launch offline (only valid in combination with --launch)", "offline" }, - { { "n", "name" }, - "When launching offline, use specified name (only makes sense in combination with --launch and --offline)", - "name" }, + { { "o", "offline" }, "Launch offline, with given player name (only valid in combination with --launch)", "offline" }, { "alive", "Write a small '" + liveCheckFile + "' file after the launcher starts" }, { { "I", "import" }, "Import instance or resource from specified local path or URL", "url" }, { "show", "Opens the window for the specified instance (by instance ID)", "show" } }); @@ -263,7 +260,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv) m_profileToUse = parser.value("profile"); if (parser.isSet("offline")) { m_offline = true; - m_offlineName = parser.value("name"); + m_offlineName = parser.value("offline"); } m_liveCheck = parser.isSet("alive"); @@ -279,8 +276,8 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv) } // error if --launch is missing with --server or --profile - if ((!m_serverToJoin.isEmpty() || !m_worldToJoin.isEmpty() || !m_profileToUse.isEmpty() || m_offline || !m_offlineName.isEmpty()) && m_instanceIdToLaunch.isEmpty()) { - std::cerr << "--server, --profile, --offline and --name can only be used in combination with --launch!" << std::endl; + if ((!m_serverToJoin.isEmpty() || !m_worldToJoin.isEmpty() || !m_profileToUse.isEmpty() || m_offline) && m_instanceIdToLaunch.isEmpty()) { + std::cerr << "--server, --profile and --offline can only be used in combination with --launch!" << std::endl; m_status = Application::Failed; return; }