26 lines
698 B
C++
26 lines
698 B
C++
#pragma once
|
|
|
|
#include <span>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace Bilicraft
|
|
{
|
|
inline constexpr std::string_view kGameVersion = BILICRAFT_BOT_GAME_VERSION;
|
|
inline constexpr std::string_view kDefaultServer = "mc.bilicraft.com:25577";
|
|
|
|
struct AppConfig
|
|
{
|
|
std::string server{kDefaultServer};
|
|
// Microsoft credential-cache key, NOT an offline player name or password.
|
|
std::string account;
|
|
std::string actionFile;
|
|
bool checkAction = false;
|
|
bool help = false;
|
|
};
|
|
|
|
// Arguments exclude argv[0]. Invalid or incomplete options throw invalid_argument.
|
|
AppConfig ParseArguments(std::span<const std::string_view> arguments);
|
|
std::string Usage();
|
|
} // namespace Bilicraft
|