From f4b51fbb9f60c55886068d942500132dda278522 Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Wed, 25 Dec 2024 00:54:24 -0600 Subject: Updated export argument --- src/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 33ca27a..d3b6ffb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,6 +16,7 @@ int main(int argc, char *argv[]) { std::string target; std::string folder; bool otrMode = false; + bool xmlMode = false; bool debug = false; app.require_subcommand(); @@ -98,17 +99,15 @@ int main(int argc, char *argv[]) { } }); - modding_export->add_option("mode", mode, "xml or binary")->required(); + modding_export->add_flag("-x,--xml", xmlMode, "XML Mode"); modding_export->add_option("", filename, "")->required()->check(CLI::ExistingFile); modding_export->parse_complete_callback([&] { const auto instance = Companion::Instance = new Companion(filename, false, debug); - if (mode == "binary") { - instance->Init(ExportType::Modding); - } else if (mode == "xml") { + if (xmlMode) { instance->Init(ExportType::XML); } else { - std::cout << "Invalid mode" << std::endl; + instance->Init(ExportType::Modding); } }); -- cgit v1.2.3