Skip to content

Commit

Permalink
feat: 切换家园远征刷最近碎片
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Sep 6, 2023
1 parent 42dce7b commit 15487fd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions source/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ void print_help();
bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string& adb_address, int& client_type, TaskList& tasks,
MaaAdbControllerType& ctrl_type);
bool app_package_activity(int client_type, std::string& package, std::string& activity);
json::value homeland_param();
void save_config(const std::string& adb, const std::string& adb_address, const int& client_type, const TaskList& tasks,
MaaAdbControllerType ctrl_type);
std::string read_adb_config(const std::filesystem::path& cur_dir);
Expand Down Expand Up @@ -146,6 +147,19 @@ bool app_package_activity(int client_type, std::string& package, std::string& ac
return true;
}

json::value homeland_param()
{
json::value param;
auto& diff = param["diff_task"];
auto& doc = diff["Sub_SwitchToFragmentPage"]["doc"];
auto& enabled = diff["Sub_SwitchToFragmentPage"]["enabled"];

doc = "切换刷最近碎片;默认false,刷最近材料";
enabled = false;

return param;
}

bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string& adb_address, int& client_type, TaskList& tasks,
MaaAdbControllerType& ctrl_type)
{
Expand Down Expand Up @@ -238,6 +252,7 @@ bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string
switch (id) {
case 1:
task_obj.type = "Homeland";
task_obj.param = homeland_param();
break;
case 2:
task_obj.type = "MaterialEvent";
Expand Down

0 comments on commit 15487fd

Please sign in to comment.