diff --git a/MeoAssistantArknights.sln.DotSettings b/MeoAssistantArknights.sln.DotSettings new file mode 100644 index 0000000000..62781328aa --- /dev/null +++ b/MeoAssistantArknights.sln.DotSettings @@ -0,0 +1,15 @@ + + True + True + True + True + True + True + True + True + True + True + True + True + True + True \ No newline at end of file diff --git a/docs/en/CALLBACK_SCHEMA.md b/docs/en/CALLBACK_SCHEMA.md index fd24fc9977..bfbe2da40c 100644 --- a/docs/en/CALLBACK_SCHEMA.md +++ b/docs/en/CALLBACK_SCHEMA.md @@ -94,7 +94,7 @@ Todo { "taskchain": string, // Last task chain "uuid": string // UUID - "runned_tasks": [ // ID of the last task run + "finished_tasks": [ // ID of the last task run int, ... ] diff --git a/docs/回调消息协议.md b/docs/回调消息协议.md index 5c630833df..eb86ba6db2 100644 --- a/docs/回调消息协议.md +++ b/docs/回调消息协议.md @@ -94,7 +94,7 @@ Todo { "taskchain": string, // 最后的任务链 "uuid": string, // 设备唯一码 - "runned_tasks": [ // 已经运行过的任务 id + "finished_tasks": [ // 已经运行过的任务 id int, ... ] diff --git a/resource/tasks.json b/resource/tasks.json index 9d0d3c4766..6599bee960 100644 --- a/resource/tasks.json +++ b/resource/tasks.json @@ -3488,7 +3488,7 @@ 120 ] }, - "CreditShop-Commoditys": { + "CreditShop-Commodities": { "template": "CreditPoint.png", "rectMove": [ -60, diff --git a/src/MeoAssistant/AbstractConfiger.cpp b/src/MeoAssistant/AbstractConfiger.cpp index dbc39c7d58..3e2a5358e3 100644 --- a/src/MeoAssistant/AbstractConfiger.cpp +++ b/src/MeoAssistant/AbstractConfiger.cpp @@ -23,7 +23,7 @@ bool asst::AbstractConfiger::load(const std::string& filename) auto&& ret = json::open(filename, true); if (!ret) { - m_last_error = "json pasing error, filename: " + filename; + m_last_error = "json passing error, filename: " + filename; return false; } diff --git a/src/MeoAssistant/Assistant.cpp b/src/MeoAssistant/Assistant.cpp index 34aa80b582..31b0dd6dac 100644 --- a/src/MeoAssistant/Assistant.cpp +++ b/src/MeoAssistant/Assistant.cpp @@ -139,7 +139,7 @@ bool asst::Assistant::set_task_params(TaskId task_id, const std::string& params) } auto& json = ret.value(); - bool setted = false; + bool is_set = false; std::unique_lock lock(m_mutex); for (auto&& [id, ptr] : m_tasks_list) { if (id != task_id) { @@ -147,11 +147,11 @@ bool asst::Assistant::set_task_params(TaskId task_id, const std::string& params) } bool enable = json.get("enable", true); ptr->set_enable(enable); - setted = ptr->set_params(json); + is_set = ptr->set_params(json); break; } - return setted; + return is_set; } std::vector asst::Assistant::get_image() const @@ -227,7 +227,7 @@ void Assistant::working_proc() { LogTraceFunction; - std::vector runned_tasks; + std::vector finished_tasks; while (!m_thread_exit) { //LogTraceScope("Assistant::working_proc Loop"); @@ -247,7 +247,7 @@ void Assistant::working_proc() .set_status(m_status); bool ret = task_ptr->run(); - runned_tasks.emplace_back(id); + finished_tasks.emplace_back(id); lock.lock(); if (!m_tasks_list.empty()) { @@ -262,9 +262,9 @@ void Assistant::working_proc() task_callback(run_msg, callback_json, this); if (!m_thread_idle && m_tasks_list.empty()) { - callback_json["runned_tasks"] = json::array(runned_tasks); + callback_json["finished_tasks"] = json::array(finished_tasks); task_callback(AsstMsg::AllTasksCompleted, callback_json, this); - runned_tasks.clear(); + finished_tasks.clear(); } auto delay = Resrc.cfg().get_options().task_delay; @@ -274,7 +274,7 @@ void Assistant::working_proc() } else { m_thread_idle = true; - runned_tasks.clear(); + finished_tasks.clear(); Log.flush(); m_condvar.wait(lock); } diff --git a/src/MeoAssistant/BattleProcessTask.cpp b/src/MeoAssistant/BattleProcessTask.cpp index c437b32814..05613084d9 100644 --- a/src/MeoAssistant/BattleProcessTask.cpp +++ b/src/MeoAssistant/BattleProcessTask.cpp @@ -217,7 +217,7 @@ bool asst::BattleProcessTask::update_opers_info(const cv::Mat& image) } const auto& cur_opers_info = analyzer.get_opers(); // 除非主动使用,不然可用干员数任何情况下都不会减少 - // 主动使用会 earse, 所以少了就是识别错了 + // 主动使用会 erase, 所以少了就是识别错了 if (cur_opers_info.size() < m_cur_opers_info.size()) { Log.error(__FUNCTION__, "Decrease in staff, Just return"); return false; diff --git a/src/MeoAssistant/Controller.cpp b/src/MeoAssistant/Controller.cpp index a81c69da4f..701d311c59 100644 --- a/src/MeoAssistant/Controller.cpp +++ b/src/MeoAssistant/Controller.cpp @@ -765,15 +765,15 @@ void asst::Controller::clear_lf_info() cv::Mat asst::Controller::get_resized_image() const { - const static cv::Size dsize(m_scale_size.first, m_scale_size.second); + const static cv::Size d_size(m_scale_size.first, m_scale_size.second); std::shared_lock image_lock(m_image_mutex); if (m_cache_image.empty()) { Log.error("image is empty"); - return { dsize, CV_8UC3 }; + return { d_size, CV_8UC3 }; } cv::Mat resized_mat; - cv::resize(m_cache_image, resized_mat, dsize, 0.0, 0.0, cv::INTER_AREA); + cv::resize(m_cache_image, resized_mat, d_size, 0.0, 0.0, cv::INTER_AREA); return resized_mat; } @@ -1217,8 +1217,8 @@ cv::Mat asst::Controller::get_image(bool raw) } } if (!success) { - const static cv::Size dsize(m_scale_size.first, m_scale_size.second); - m_cache_image = cv::Mat(dsize, CV_8UC3); + const static cv::Size d_size(m_scale_size.first, m_scale_size.second); + m_cache_image = cv::Mat(d_size, CV_8UC3); } if (raw) { diff --git a/src/MeoAssistant/CopilotTask.cpp b/src/MeoAssistant/CopilotTask.cpp index 7cd58ad9d8..b1f0054aec 100644 --- a/src/MeoAssistant/CopilotTask.cpp +++ b/src/MeoAssistant/CopilotTask.cpp @@ -28,7 +28,7 @@ asst::CopilotTask::CopilotTask(const AsstCallback& callback, void* callback_arg) bool asst::CopilotTask::set_params(const json::value& params) { - if (m_runned) { + if (m_finished) { return false; } diff --git a/src/MeoAssistant/CreditShopImageAnalyzer.cpp b/src/MeoAssistant/CreditShopImageAnalyzer.cpp index bf952bfa26..90fe2edfb8 100644 --- a/src/MeoAssistant/CreditShopImageAnalyzer.cpp +++ b/src/MeoAssistant/CreditShopImageAnalyzer.cpp @@ -21,37 +21,37 @@ void asst::CreditShopImageAnalyzer::set_white_list(std::vector blac bool asst::CreditShopImageAnalyzer::analyze() { - m_commoditys.clear(); + m_commodities.clear(); m_need_to_buy.clear(); m_result.clear(); - return commoditys_analyze() && whether_to_buy_analyze() && sold_out_analyze(); + return commodities_analyze() && whether_to_buy_analyze() && sold_out_analyze(); } -bool asst::CreditShopImageAnalyzer::commoditys_analyze() +bool asst::CreditShopImageAnalyzer::commodities_analyze() { // 识别信用点的图标 - const auto commodity_task_ptr = Task.get("CreditShop-Commoditys"); - MultiMatchImageAnalyzer mm_annlyzer(m_image); - mm_annlyzer.set_task_info(commodity_task_ptr); + const auto commodity_task_ptr = Task.get("CreditShop-Commodities"); + MultiMatchImageAnalyzer mm_analyzer(m_image); + mm_analyzer.set_task_info(commodity_task_ptr); - if (!mm_annlyzer.analyze()) { + if (!mm_analyzer.analyze()) { return false; } - mm_annlyzer.sort_result_horizontal(); - auto credit_points_result = mm_annlyzer.get_result(); + mm_analyzer.sort_result_horizontal(); + auto credit_points_result = mm_analyzer.get_result(); if (credit_points_result.empty()) { return false; } - m_commoditys.reserve(credit_points_result.size()); + m_commodities.reserve(credit_points_result.size()); for (const MatchRect& mr : credit_points_result) { Rect commodity; commodity.x = mr.rect.x + commodity_task_ptr->rect_move.x; commodity.y = mr.rect.y + commodity_task_ptr->rect_move.y; commodity.width = commodity_task_ptr->rect_move.width; commodity.height = commodity_task_ptr->rect_move.height; - m_commoditys.emplace_back(commodity); + m_commodities.emplace_back(commodity); } return true; @@ -61,7 +61,7 @@ bool asst::CreditShopImageAnalyzer::whether_to_buy_analyze() { const auto product_name_task_ptr = Task.get("CreditShop-ProductName"); - for (const Rect& commodity : m_commoditys) { + for (const Rect& commodity : m_commodities) { // 商品名的区域 Rect name_roi = product_name_task_ptr->roi; name_roi.x += commodity.x; diff --git a/src/MeoAssistant/CreditShopImageAnalyzer.h b/src/MeoAssistant/CreditShopImageAnalyzer.h index 44b63d4057..cbb2ebb600 100644 --- a/src/MeoAssistant/CreditShopImageAnalyzer.h +++ b/src/MeoAssistant/CreditShopImageAnalyzer.h @@ -29,11 +29,11 @@ namespace asst { AbstractImageAnalyzer::set_image(image, roi); } - bool commoditys_analyze(); + bool commodities_analyze(); bool whether_to_buy_analyze(); bool sold_out_analyze(); - std::vector m_commoditys; + std::vector m_commodities; std::vector> m_need_to_buy; std::vector m_result; diff --git a/src/MeoAssistant/DepotImageAnalyzer.cpp b/src/MeoAssistant/DepotImageAnalyzer.cpp index 6f6788eff9..bafda8f645 100644 --- a/src/MeoAssistant/DepotImageAnalyzer.cpp +++ b/src/MeoAssistant/DepotImageAnalyzer.cpp @@ -45,8 +45,8 @@ void asst::DepotImageAnalyzer::resize() LogTraceFunction; m_resized_rect = Task.get("DeoptMatchData")->roi; - cv::Size dsize(m_resized_rect.width, m_resized_rect.height); - cv::resize(m_image, m_image_resized, dsize, 0, 0, cv::INTER_AREA); + cv::Size d_size(m_resized_rect.width, m_resized_rect.height); + cv::resize(m_image, m_image_resized, d_size, 0, 0, cv::INTER_AREA); #ifdef ASST_DEBUG cv::resize(m_image_draw, m_image_draw_resized, dsize, 0, 0, cv::INTER_AREA); #endif @@ -206,7 +206,7 @@ int asst::DepotImageAnalyzer::match_quantity(const Rect& roi) // split const int max_spacing = static_cast(task_ptr->templ_threshold); std::vector contours; - int iright = bin.cols - 1, ileft = 0; + int i_right = bin.cols - 1, i_left = 0; bool in = false; int spacing = 0; @@ -219,18 +219,18 @@ int asst::DepotImageAnalyzer::match_quantity(const Rect& roi) } } if (in && !has_white) { - ileft = i; + i_left = i; in = false; spacing = 0; - contours.emplace_back(ileft, iright + 1); // range 是前闭后开的 + contours.emplace_back(i_left, i_right + 1); // range 是前闭后开的 } else if (!in && has_white) { - iright = i; + i_right = i; in = true; } else if (!in) { if (++spacing > max_spacing && - ileft != 0) { + i_left != 0) { // filter out noise break; } diff --git a/src/MeoAssistant/FightTask.cpp b/src/MeoAssistant/FightTask.cpp index c05a4f4355..87084f9aa4 100644 --- a/src/MeoAssistant/FightTask.cpp +++ b/src/MeoAssistant/FightTask.cpp @@ -67,7 +67,7 @@ bool asst::FightTask::set_params(const json::value& params) m_stage_drops_plugin_ptr->set_specify_quantity(drops); } - if (!m_runned) { + if (!m_finished) { if (stage.empty()) { m_start_up_task_ptr->set_tasks({ "UsePrts", "UsePrts-StageSN", "StartButton1", "StageBegin" }); m_stage_task_ptr->set_tasks({ "UsePrts", "UsePrts-StageSN", "StartButton1", "LastBattle" }); diff --git a/src/MeoAssistant/HashImageAnalyzer.cpp b/src/MeoAssistant/HashImageAnalyzer.cpp index ed6318df5c..bf2da4aec5 100644 --- a/src/MeoAssistant/HashImageAnalyzer.cpp +++ b/src/MeoAssistant/HashImageAnalyzer.cpp @@ -31,7 +31,7 @@ bool asst::HashImageAnalyzer::analyze() if (m_need_bound) { to_hash = bound_bin(to_hash); } - std::string hash_result = shash(to_hash); + std::string hash_result = s_hash(to_hash); //Log.debug(hash_result); int min_dist = INT_MAX; @@ -86,7 +86,7 @@ const std::vector& asst::HashImageAnalyzer::get_hash() const noexce return m_hash_result; } -std::string asst::HashImageAnalyzer::shash(const cv::Mat& img) +std::string asst::HashImageAnalyzer::s_hash(const cv::Mat& img) { constexpr static int HashKernelSize = 16; cv::Mat resized; diff --git a/src/MeoAssistant/HashImageAnalyzer.h b/src/MeoAssistant/HashImageAnalyzer.h index 6bebe70fd1..70b5e7b6a0 100644 --- a/src/MeoAssistant/HashImageAnalyzer.h +++ b/src/MeoAssistant/HashImageAnalyzer.h @@ -22,7 +22,7 @@ namespace asst const std::vector& get_min_dist_name() const noexcept; const std::vector& get_hash() const noexcept; - static std::string shash(const cv::Mat& img); + static std::string s_hash(const cv::Mat& img); static int hamming(std::string hash1, std::string hash2); static std::vector split_bin(const cv::Mat& bin); static cv::Mat bound_bin(const cv::Mat& bin); diff --git a/src/MeoAssistant/InfrastAbstractTask.cpp b/src/MeoAssistant/InfrastAbstractTask.cpp index 558df9ff0a..ab9a228af6 100644 --- a/src/MeoAssistant/InfrastAbstractTask.cpp +++ b/src/MeoAssistant/InfrastAbstractTask.cpp @@ -139,7 +139,7 @@ void asst::InfrastAbstractTask::await_swipe() sleep(extra_delay); } -bool asst::InfrastAbstractTask::click_bottomleft_tab() +bool asst::InfrastAbstractTask::click_bottom_left_tab() { LogTraceFunction; diff --git a/src/MeoAssistant/InfrastAbstractTask.h b/src/MeoAssistant/InfrastAbstractTask.h index bfec4cff06..46b3efbcb4 100644 --- a/src/MeoAssistant/InfrastAbstractTask.h +++ b/src/MeoAssistant/InfrastAbstractTask.h @@ -34,7 +34,7 @@ namespace asst void async_swipe_of_operlist(bool reverse = false); void await_swipe(); - virtual bool click_bottomleft_tab(); // 点击进入设施后,左下角的tab(我也不知道这玩意该叫啥) + virtual bool click_bottom_left_tab(); // 点击进入设施后,左下角的tab(我也不知道这玩意该叫啥) virtual bool click_clear_button(); // 点击干员选择页面的“清空选择”按钮 virtual bool click_confirm_button(); // 点击干员选择页面的“确认”按钮 diff --git a/src/MeoAssistant/InfrastDormTask.cpp b/src/MeoAssistant/InfrastDormTask.cpp index 75c1c0317e..292774185c 100644 --- a/src/MeoAssistant/InfrastDormTask.cpp +++ b/src/MeoAssistant/InfrastDormTask.cpp @@ -48,7 +48,7 @@ bool asst::InfrastDormTask::opers_choose() const int without_skill = InfrastOperImageAnalyzer::All ^ InfrastOperImageAnalyzer::Skill; oper_analyzer.set_to_be_calced(without_skill); if (!oper_analyzer.analyze()) { - Log.error("mood analyze faild!"); + Log.error("mood analyze failed!"); return false; } oper_analyzer.sort_by_mood(); diff --git a/src/MeoAssistant/InfrastMfgTask.cpp b/src/MeoAssistant/InfrastMfgTask.cpp index 0ea13567af..f12cc14d3d 100644 --- a/src/MeoAssistant/InfrastMfgTask.cpp +++ b/src/MeoAssistant/InfrastMfgTask.cpp @@ -10,7 +10,7 @@ bool asst::InfrastMfgTask::_run() swipe_to_the_left_of_main_ui(); enter_facility(0); - click_bottomleft_tab(); + click_bottom_left_tab(); if (!shift_facility_list()) { return false; diff --git a/src/MeoAssistant/InfrastOfficeTask.cpp b/src/MeoAssistant/InfrastOfficeTask.cpp index a3857dad3d..6041c5a9ac 100644 --- a/src/MeoAssistant/InfrastOfficeTask.cpp +++ b/src/MeoAssistant/InfrastOfficeTask.cpp @@ -11,7 +11,7 @@ bool asst::InfrastOfficeTask::_run() swipe_to_the_right_of_main_ui(); enter_facility(); - click_bottomleft_tab(); + click_bottom_left_tab(); for (int i = 0; i <= OperSelectRetryTimes; ++i) { if (need_exit()) { diff --git a/src/MeoAssistant/InfrastProductionTask.cpp b/src/MeoAssistant/InfrastProductionTask.cpp index 67d9fc0125..176b3834b7 100644 --- a/src/MeoAssistant/InfrastProductionTask.cpp +++ b/src/MeoAssistant/InfrastProductionTask.cpp @@ -100,10 +100,10 @@ bool asst::InfrastProductionTask::shift_facility_list() locked_analyzer.set_image(image); if (locked_analyzer.analyze()) { - m_cur_num_of_lokced_opers = static_cast(locked_analyzer.get_result().size()); + m_cur_num_of_locked_opers = static_cast(locked_analyzer.get_result().size()); } else { - m_cur_num_of_lokced_opers = 0; + m_cur_num_of_locked_opers = 0; } /* 进入干员选择页面 */ @@ -230,26 +230,26 @@ bool asst::InfrastProductionTask::optimal_calc() { LogTraceFunction; auto& facility_info = Resrc.infrast().get_facility_info(facility_name()); - int cur_max_num_of_opers = facility_info.max_num_of_opers - m_cur_num_of_lokced_opers; + int cur_max_num_of_opers = facility_info.max_num_of_opers - m_cur_num_of_locked_opers; - std::vector all_avaliable_combs; - all_avaliable_combs.reserve(m_all_available_opers.size()); + std::vector all_available_combs; + all_available_combs.reserve(m_all_available_opers.size()); for (auto&& oper : m_all_available_opers) { auto comb = efficient_regex_calc(oper.skills); comb.name_img = oper.name_img; - all_avaliable_combs.emplace_back(std::move(comb)); + all_available_combs.emplace_back(std::move(comb)); } // 先把单个的技能按效率排个序,取效率最高的几个 std::vector optimal_combs; optimal_combs.reserve(cur_max_num_of_opers); double max_efficient = 0; - std::sort(all_avaliable_combs.begin(), all_avaliable_combs.end(), + std::sort(all_available_combs.begin(), all_available_combs.end(), [&](const infrast::SkillsComb& lhs, const infrast::SkillsComb& rhs) -> bool { return lhs.efficient.at(m_product) > rhs.efficient.at(m_product); }); - for (const auto& comb : all_avaliable_combs) { + for (const auto& comb : all_available_combs) { std::string skill_str; for (const auto& skill : comb.skills) { skill_str += skill.id + " "; @@ -259,7 +259,7 @@ bool asst::InfrastProductionTask::optimal_calc() std::unordered_map skills_num; for (int i = 0; i != m_all_available_opers.size(); ++i) { - const auto& comb = all_avaliable_combs.at(i); + const auto& comb = all_available_combs.at(i); bool out_of_num = false; for (auto&& skill : comb.skills) { @@ -273,7 +273,7 @@ bool asst::InfrastProductionTask::optimal_calc() } optimal_combs.emplace_back(comb); - max_efficient += all_avaliable_combs.at(i).efficient.at(m_product); + max_efficient += all_available_combs.at(i).efficient.at(m_product); for (auto&& skill : comb.skills) { ++skills_num[skill.id]; @@ -295,7 +295,7 @@ bool asst::InfrastProductionTask::optimal_calc() } // 如果有被锁住的干员,说明当前基建没升满级,组合就不启用 - if (m_cur_num_of_lokced_opers != 0) { + if (m_cur_num_of_locked_opers != 0) { m_optimal_combs = std::move(optimal_combs); return true; } @@ -304,7 +304,7 @@ bool asst::InfrastProductionTask::optimal_calc() auto& all_group = Resrc.infrast().get_skills_group(facility_name()); for (const infrast::SkillsGroup& group : all_group) { Log.trace(group.desc); - auto cur_available_opers = all_avaliable_combs; + auto cur_available_opers = all_available_combs; bool group_unavailable = false; std::vector cur_combs; cur_combs.reserve(cur_max_num_of_opers); @@ -458,7 +458,7 @@ bool asst::InfrastProductionTask::opers_choose() bool has_error = false; auto& facility_info = Resrc.infrast().get_facility_info(facility_name()); - int cur_max_num_of_opers = facility_info.max_num_of_opers - m_cur_num_of_lokced_opers; + int cur_max_num_of_opers = facility_info.max_num_of_opers - m_cur_num_of_locked_opers; const int face_hash_thres = std::dynamic_pointer_cast( Task.get("InfrastOperFaceHash"))->dist_threshold; diff --git a/src/MeoAssistant/InfrastProductionTask.h b/src/MeoAssistant/InfrastProductionTask.h index 469989dc7d..9288578cd7 100644 --- a/src/MeoAssistant/InfrastProductionTask.h +++ b/src/MeoAssistant/InfrastProductionTask.h @@ -31,7 +31,7 @@ namespace asst std::string m_product; std::string m_uses_of_drones; - int m_cur_num_of_lokced_opers = 0; + int m_cur_num_of_locked_opers = 0; std::vector m_all_available_opers; std::vector m_optimal_combs; std::vector m_facility_list_tabs; diff --git a/src/MeoAssistant/InfrastReceptionTask.cpp b/src/MeoAssistant/InfrastReceptionTask.cpp index 993a1e3dbf..5982cf6ec5 100644 --- a/src/MeoAssistant/InfrastReceptionTask.cpp +++ b/src/MeoAssistant/InfrastReceptionTask.cpp @@ -14,7 +14,7 @@ bool asst::InfrastReceptionTask::_run() swipe_to_the_right_of_main_ui(); enter_facility(); - click_bottomleft_tab(); + click_bottom_left_tab(); close_end_of_clue_exchange(); @@ -27,7 +27,7 @@ bool asst::InfrastReceptionTask::_run() return false; } click_return_button(); - click_bottomleft_tab(); + click_bottom_left_tab(); if (need_exit()) { return false; } diff --git a/src/MeoAssistant/InfrastTask.cpp b/src/MeoAssistant/InfrastTask.cpp index 4ee3b3b36a..3efdf9bf57 100644 --- a/src/MeoAssistant/InfrastTask.cpp +++ b/src/MeoAssistant/InfrastTask.cpp @@ -35,7 +35,7 @@ asst::InfrastTask::InfrastTask(const AsstCallback& callback, void* callback_arg) bool asst::InfrastTask::set_params(const json::value& params) { - if (!m_runned) { + if (!m_finished) { auto facility_opt = params.find("facility"); if (!facility_opt) { return false; diff --git a/src/MeoAssistant/InfrastTradeTask.cpp b/src/MeoAssistant/InfrastTradeTask.cpp index 30019c21df..663c7409d6 100644 --- a/src/MeoAssistant/InfrastTradeTask.cpp +++ b/src/MeoAssistant/InfrastTradeTask.cpp @@ -6,7 +6,7 @@ bool asst::InfrastTradeTask::_run() swipe_to_the_left_of_main_ui(); enter_facility(0); - click_bottomleft_tab(); + click_bottom_left_tab(); if (!shift_facility_list()) { return false; diff --git a/src/MeoAssistant/PackageTask.cpp b/src/MeoAssistant/PackageTask.cpp index 3e14f72691..970c96c59c 100644 --- a/src/MeoAssistant/PackageTask.cpp +++ b/src/MeoAssistant/PackageTask.cpp @@ -9,7 +9,7 @@ bool asst::PackageTask::run() Log.info("task disabled, pass", basic_info().to_string()); return true; } - m_runned = true; + m_finished = true; const auto task_delay = Resrc.cfg().get_options().task_delay; diff --git a/src/MeoAssistant/PackageTask.h b/src/MeoAssistant/PackageTask.h index e1ca8160fe..ecb0baa356 100644 --- a/src/MeoAssistant/PackageTask.h +++ b/src/MeoAssistant/PackageTask.h @@ -31,7 +31,7 @@ namespace asst protected: virtual bool _run() override { return true; } - bool m_runned = false; + bool m_finished = false; std::vector> m_subtasks; }; } diff --git a/src/MeoAssistant/RoguelikeBattleTaskPlugin.cpp b/src/MeoAssistant/RoguelikeBattleTaskPlugin.cpp index 4292c8a8f8..0cd93f947c 100644 --- a/src/MeoAssistant/RoguelikeBattleTaskPlugin.cpp +++ b/src/MeoAssistant/RoguelikeBattleTaskPlugin.cpp @@ -37,8 +37,8 @@ bool asst::RoguelikeBattleTaskPlugin::_run() { using namespace std::chrono_literals; - bool getted_info = get_stage_info(); - if (!getted_info) { + bool gotten_info = get_stage_info(); + if (!gotten_info) { return true; } if (!wait_start()) { @@ -234,7 +234,7 @@ bool asst::RoguelikeBattleTaskPlugin::auto_battle() // 超过一半的人费用都没好,那就不下人 if (available_count <= not_cooling_count / 2) { Log.trace("already used", m_used_tiles.size(), ", now_total", opers.size(), - ", avaliable", available_count, ", not_cooling", not_cooling_count); + ", available", available_count, ", not_cooling", not_cooling_count); return true; } } diff --git a/src/MeoAssistant/RoguelikeCopilotConfiger.cpp b/src/MeoAssistant/RoguelikeCopilotConfiger.cpp index 5881b62b91..bd5f3b1092 100644 --- a/src/MeoAssistant/RoguelikeCopilotConfiger.cpp +++ b/src/MeoAssistant/RoguelikeCopilotConfiger.cpp @@ -21,12 +21,12 @@ bool asst::RoguelikeCopilotConfiger::parse(const json::value& json) data.stage_name = stage_name; if (auto opt = stage_info.find("replacement_home")) { for (auto& point : opt.value()) { - data.replacement_home.emplace_back((int)point[0], (int)point[1]); + data.replacement_home.emplace_back(static_cast(point[0]), static_cast(point[1])); } } if (auto opt = stage_info.find("key_kills")) { for (const auto& key_kill : opt.value()) { - data.key_kills.emplace_back((int)key_kill); + data.key_kills.emplace_back(static_cast(key_kill)); } } m_stage_data.emplace(std::move(stage_name), std::move(data)); diff --git a/src/MeoAssistant/RoguelikeCustomStartTaskPlugin.cpp b/src/MeoAssistant/RoguelikeCustomStartTaskPlugin.cpp index 85eff9bab7..802912fa8b 100644 --- a/src/MeoAssistant/RoguelikeCustomStartTaskPlugin.cpp +++ b/src/MeoAssistant/RoguelikeCustomStartTaskPlugin.cpp @@ -119,7 +119,7 @@ bool asst::RoguelikeCustomStartTaskPlugin::hijack_core_char() const auto& role = Resrc.battle_data().get_role(char_name); auto role_iter = RoleOcrNameMap.find(role); if (role_iter == RoleOcrNameMap.cend()) { - Log.error("Unknow role", char_name, static_cast(role)); + Log.error("Unknown role", char_name, static_cast(role)); return false; } // select role diff --git a/src/MeoAssistant/RoguelikeSkillSelectionImageAnalyzer.cpp b/src/MeoAssistant/RoguelikeSkillSelectionImageAnalyzer.cpp index e83ea309c7..35d4e8c507 100644 --- a/src/MeoAssistant/RoguelikeSkillSelectionImageAnalyzer.cpp +++ b/src/MeoAssistant/RoguelikeSkillSelectionImageAnalyzer.cpp @@ -25,7 +25,7 @@ bool asst::RoguelikeSkillSelectionImageAnalyzer::analyze() return false; } - int unknow_index = 0; + int unknown_index = 0; for (const auto& flag : flags) { std::string name = name_analyze(flag.rect); auto skills = skill_analyze(flag.rect); @@ -33,7 +33,7 @@ bool asst::RoguelikeSkillSelectionImageAnalyzer::analyze() continue; } if (name.empty()) { - name = "Unknown" + std::to_string(unknow_index++); + name = "Unknown" + std::to_string(unknown_index++); } m_result.emplace(std::move(name), std::move(skills)); } diff --git a/src/MeoAssistant/StageDropsConfiger.h b/src/MeoAssistant/StageDropsConfiger.h index 97b0dc11a0..31d0ffebab 100644 --- a/src/MeoAssistant/StageDropsConfiger.h +++ b/src/MeoAssistant/StageDropsConfiger.h @@ -49,8 +49,8 @@ namespace asst }; struct StageDropInfo { - StageDropType droptype = StageDropType::Unknown; - std::string droptype_name; + StageDropType drop_type = StageDropType::Unknown; + std::string drop_type_name; std::string item_id; std::string item_name; int quantity = 0; diff --git a/src/MeoAssistant/StageDropsImageAnalyzer.cpp b/src/MeoAssistant/StageDropsImageAnalyzer.cpp index 0a1fa12677..5f7d6ee3c3 100644 --- a/src/MeoAssistant/StageDropsImageAnalyzer.cpp +++ b/src/MeoAssistant/StageDropsImageAnalyzer.cpp @@ -184,12 +184,12 @@ bool asst::StageDropsImageAnalyzer::analyze_drops() bool has_error = false; const auto& roi = task_ptr->roi; for (auto it = m_baseline.cbegin(); it != m_baseline.cend(); ++it) { - const auto& [baseline, droptype] = *it; - bool is_first_droptype = it == m_baseline.cbegin(); + const auto& [baseline, drop_type] = *it; + bool is_first_drop_type = it == m_baseline.cbegin(); int size = baseline.width / (roi.width + 10) + 1; // + 10 为了带点容差 for (int i = 1; i <= size; ++i) { Rect item_roi; - if (is_first_droptype) { + if (is_first_drop_type) { // 因为第一个黄色的 baseline 是渐变的,圈出来的一般左边会少一段,所以这里直接从右边开始往左推 int x = baseline.x + baseline.width - i * roi.width; item_roi = Rect(x, baseline.y + roi.y, roi.width, roi.height); @@ -200,7 +200,7 @@ bool asst::StageDropsImageAnalyzer::analyze_drops() item_roi = Rect(x, baseline.y + roi.y, roi.width, roi.height); } - std::string item = match_item(item_roi, droptype, size - i, size); + std::string item = match_item(item_roi, drop_type, size - i, size); int quantity = match_quantity(item_roi); Log.info("Item id:", item, ", quantity:", quantity); #ifdef ASST_DEBUG @@ -216,7 +216,7 @@ bool asst::StageDropsImageAnalyzer::analyze_drops() Log.warn(__FUNCTION__, "item id is empty"); } StageDropInfo info; - info.droptype = droptype; + info.drop_type = drop_type; info.item_id = std::move(item); info.quantity = quantity; @@ -233,7 +233,7 @@ bool asst::StageDropsImageAnalyzer::analyze_drops() { StageDropType::Reward, "REWARD_DROP" }, { StageDropType::Unknown, "UNKNOWN_DROP" } }; - info.droptype_name = DropTypeName.at(droptype); + info.drop_type_name = DropTypeName.at(drop_type); m_drops.emplace_back(std::move(info)); } @@ -265,7 +265,7 @@ bool asst::StageDropsImageAnalyzer::analyze_baseline() const int min_width = static_cast(task_ptr->special_threshold); const int max_spacing = static_cast(task_ptr->templ_threshold); - int istart = 0, iend = bounding.cols - 1; + int i_start = 0, i_end = bounding.cols - 1; bool in = true; // 是否正处在白线中 int spacing = 0; @@ -295,32 +295,32 @@ bool asst::StageDropsImageAnalyzer::analyze_baseline() if (in && !is_white) { in = false; - iend = i; - int width = iend - istart; + i_end = i; + int width = i_end - i_start; if (width < min_width) { - spacing += iend - istart; + spacing += i_end - i_start; } else { spacing = 0; - Rect baseline{ x_offset + istart, y_offset, width, bounding_rect.height }; + Rect baseline{ x_offset + i_start, y_offset, width, bounding_rect.height }; m_baseline.emplace_back(baseline, match_droptype(baseline)); } } else if (!in && is_white) { - istart = i; + i_start = i; in = true; } else if (!in) { - if (++spacing > max_spacing && istart != 0) { + if (++spacing > max_spacing && i_start != 0) { break; } } } if (in) { // 最右边的白线贴着 bounding 边的情况 - int width = bounding.cols - 1 - istart; + int width = bounding.cols - 1 - i_start; if (width >= min_width) { - Rect baseline{ x_offset + istart, y_offset, width, bounding_rect.height }; + Rect baseline{ x_offset + i_start, y_offset, width, bounding_rect.height }; m_baseline.emplace_back(baseline, match_droptype(baseline)); } } @@ -482,7 +482,7 @@ int asst::StageDropsImageAnalyzer::match_quantity(const Rect& roi) // split const int max_spacing = static_cast(task_ptr->templ_threshold); std::vector contours; - int iright = bin.cols - 1, ileft = 0; + int i_right = bin.cols - 1, i_left = 0; bool in = false; int spacing = 0; @@ -495,18 +495,18 @@ int asst::StageDropsImageAnalyzer::match_quantity(const Rect& roi) } } if (in && !has_white) { - ileft = i; + i_left = i; in = false; spacing = 0; - contours.emplace_back(ileft, iright + 1); // range 是前闭后开的 + contours.emplace_back(i_left, i_right + 1); // range 是前闭后开的 } else if (!in && has_white) { - iright = i; + i_right = i; in = true; } else if (!in) { if (++spacing > max_spacing && - ileft != 0) { + i_left != 0) { // filter out noise break; } diff --git a/src/MeoAssistant/StageDropsImageAnalyzer.h b/src/MeoAssistant/StageDropsImageAnalyzer.h index 19f133a655..0e35c1e7bf 100644 --- a/src/MeoAssistant/StageDropsImageAnalyzer.h +++ b/src/MeoAssistant/StageDropsImageAnalyzer.h @@ -15,7 +15,7 @@ namespace asst StageKey get_stage_key() const; int get_stars() const noexcept; - // > + // > const auto& get_drops() const noexcept { return m_drops; @@ -36,7 +36,7 @@ namespace asst StageDifficulty m_difficulty = StageDifficulty::Normal; int m_stars = 0; std::vector> m_baseline; - // > + // > std::vector m_drops; }; } diff --git a/src/MeoAssistant/StageDropsTaskPlugin.cpp b/src/MeoAssistant/StageDropsTaskPlugin.cpp index 903b8415d6..0dafd4a18e 100644 --- a/src/MeoAssistant/StageDropsTaskPlugin.cpp +++ b/src/MeoAssistant/StageDropsTaskPlugin.cpp @@ -26,8 +26,8 @@ bool asst::StageDropsTaskPlugin::verify(AsstMsg msg, const json::value& details) int64_t pre_start_time = pre_time_opt ? pre_time_opt.value() : 0; auto pre_reg_time_opt = m_status->get_number("LastRecognizeDrops"); int64_t pre_recognize_time = pre_reg_time_opt ? pre_reg_time_opt.value() : 0; - if (pre_start_time + RecognizationTimeOffset == pre_recognize_time) { - Log.info("Recognization time too close, pass", pre_start_time, pre_recognize_time); + if (pre_start_time + RecognitionTimeOffset == pre_recognize_time) { + Log.info("Recognitions time too close, pass", pre_start_time, pre_recognize_time); return false; } return true; @@ -71,7 +71,7 @@ bool asst::StageDropsTaskPlugin::_run() { LogTraceFunction; - set_startbutton_delay(); + set_start_button_delay(); if (!recognize_drops()) { return false; @@ -121,7 +121,7 @@ bool asst::StageDropsTaskPlugin::recognize_drops() auto last_time_opt = m_status->get_number("LastStartButton2"); auto last_time = last_time_opt ? last_time_opt.value() : 0; - m_status->set_number("LastRecognizeDrops", last_time + RecognizationTimeOffset); + m_status->set_number("LastRecognizeDrops", last_time + RecognitionTimeOffset); return true; } @@ -137,7 +137,7 @@ void asst::StageDropsTaskPlugin::drop_info_callback() info["quantity"] = drop.quantity; m_drop_stats[drop.item_id] += drop.quantity; info["itemName"] = drop.item_name; - info["dropType"] = drop.droptype_name; + info["dropType"] = drop.drop_type_name; drops_vec.emplace_back(std::move(info)); } @@ -173,16 +173,16 @@ void asst::StageDropsTaskPlugin::drop_info_callback() m_cur_info_json = std::move(details); } -void asst::StageDropsTaskPlugin::set_startbutton_delay() +void asst::StageDropsTaskPlugin::set_start_button_delay() { LogTraceFunction; - if (!m_startbutton_delay_setted) { + if (!m_start_button_delay_is_set) { auto last_time_opt = m_status->get_number("LastStartButton2"); int64_t pre_start_time = last_time_opt ? last_time_opt.value() : 0; if (pre_start_time > 0) { - m_startbutton_delay_setted = true; + m_start_button_delay_is_set = true; int64_t duration = time(nullptr) - pre_start_time; int elapsed = Task.get("EndOfAction")->pre_delay + Task.get("PRTS")->rear_delay; int64_t delay = duration * 1000 - elapsed; @@ -219,8 +219,8 @@ void asst::StageDropsTaskPlugin::upload_to_penguin() auto& all_drops = body["drops"]; for (const auto& drop : m_cur_info_json["drops"].as_array()) { static const std::vector filter = { "NORMAL_DROP", "EXTRA_DROP" , "FURNITURE", "SPECIAL_DROP" }; - std::string droptype = drop.at("dropType").as_string(); - if (std::find(filter.cbegin(), filter.cend(), droptype) == filter.cend()) { + std::string drop_type = drop.at("dropType").as_string(); + if (std::find(filter.cbegin(), filter.cend(), drop_type) == filter.cend()) { continue; } if (drop.at("itemId").as_string().empty()) { diff --git a/src/MeoAssistant/StageDropsTaskPlugin.h b/src/MeoAssistant/StageDropsTaskPlugin.h index 8a53bd07e8..94f4cdfe3b 100644 --- a/src/MeoAssistant/StageDropsTaskPlugin.h +++ b/src/MeoAssistant/StageDropsTaskPlugin.h @@ -30,13 +30,13 @@ namespace asst bool recognize_drops(); void drop_info_callback(); - void set_startbutton_delay(); + void set_start_button_delay(); bool check_stage_valid(); bool check_specify_quantity() const; void stop_task(); void upload_to_penguin(); - static constexpr int64_t RecognizationTimeOffset = 20; + static constexpr int64_t RecognitionTimeOffset = 20; std::string m_stage_code; StageDifficulty m_stage_difficulty = StageDifficulty::Normal; @@ -45,7 +45,7 @@ namespace asst std::unordered_map m_drop_stats; json::value m_cur_info_json; - bool m_startbutton_delay_setted = false; + bool m_start_button_delay_is_set = false; std::vector> m_upload_pending; ProcessTask* m_cast_ptr = nullptr; bool m_enable_penguid = false; diff --git a/src/MeoAssistant/TaskData.cpp b/src/MeoAssistant/TaskData.cpp index f1b4c04ca2..ba782d2cc2 100644 --- a/src/MeoAssistant/TaskData.cpp +++ b/src/MeoAssistant/TaskData.cpp @@ -19,7 +19,7 @@ bool asst::TaskData::parse(const json::value& json) LogTraceFunction; auto to_lower = [](char c) -> char { - return char(std::tolower(c)); + return static_cast(std::tolower(c)); }; for (const auto& [name, task_json] : json.as_object()) { std::string algorithm_str = task_json.get("algorithm", "matchtemplate"); @@ -58,7 +58,7 @@ bool asst::TaskData::parse(const json::value& json) "specialThreshold", 0); if (auto opt = task_json.find("maskRange")) { auto& mask_range = *opt; - match_task_info_ptr->mask_range = std::make_pair((int)mask_range[0], (int)mask_range[1]); + match_task_info_ptr->mask_range = std::make_pair(static_cast(mask_range[0]), static_cast(mask_range[1])); } task_info_ptr = match_task_info_ptr; @@ -86,7 +86,7 @@ bool asst::TaskData::parse(const json::value& json) if (auto opt = task_json.find("maskRange")) { auto& mask_range = *opt; - hash_task_info_ptr->mask_range = std::make_pair((int)mask_range[0], (int)mask_range[1]); + hash_task_info_ptr->mask_range = std::make_pair(static_cast(mask_range[0]), static_cast(mask_range[1])); } hash_task_info_ptr->bound = task_json.get("bound", true); @@ -132,8 +132,8 @@ bool asst::TaskData::parse(const json::value& json) task_info_ptr->max_times = task_json.get("maxTimes", INT_MAX); if (auto opt = task_json.find("exceededNext")) { - for (const json::value& excceed_next : opt.value()) { - task_info_ptr->exceeded_next.emplace_back(excceed_next.as_string()); + for (const json::value& exceed_next : opt.value()) { + task_info_ptr->exceeded_next.emplace_back(exceed_next.as_string()); } } if (auto opt = task_json.find("onErrorNext")) { @@ -150,10 +150,10 @@ bool asst::TaskData::parse(const json::value& json) } if (auto opt = task_json.find("roi")) { auto& roi_arr = *opt; - int x = (int)roi_arr[0]; - int y = (int)roi_arr[1]; - int width = (int)roi_arr[2]; - int height = (int)roi_arr[3]; + int x = static_cast(roi_arr[0]); + int y = static_cast(roi_arr[1]); + int width = static_cast(roi_arr[2]); + int height = static_cast(roi_arr[3]); #ifdef ASST_DEBUG if (x + width > WindowWidthDefault || y + height > WindowHeightDefault) { m_last_error = name + " roi is out of bounds"; diff --git a/src/MeoAsstGui/Helper/AsstProxy.cs b/src/MeoAsstGui/Helper/AsstProxy.cs index 9e1667d6f1..1253f70c9c 100644 --- a/src/MeoAsstGui/Helper/AsstProxy.cs +++ b/src/MeoAsstGui/Helper/AsstProxy.cs @@ -30,6 +30,7 @@ namespace MeoAsstGui #pragma warning restore SA1135 // Using directives should be qualified #pragma warning disable SA1121 // Use built-in type alias + /// /// MeoAssistant 代理类。 /// @@ -37,7 +38,7 @@ namespace MeoAsstGui { private delegate void CallbackDelegate(int msg, IntPtr json_buffer, IntPtr custom_arg); - private delegate void ProcCallbckMsg(AsstMsg msg, JObject details); + private delegate void ProcCallbackMsg(AsstMsg msg, JObject details); [DllImport("MeoAssistant.dll")] private static extern bool AsstLoadResource(byte[] dirname); @@ -248,7 +249,7 @@ namespace MeoAsstGui // Console.WriteLine(json_str); JObject json = (JObject)JsonConvert.DeserializeObject(json_str); - ProcCallbckMsg dlg = ProcMsg; + ProcCallbackMsg dlg = ProcMsg; Execute.OnUIThread(() => { dlg((AsstMsg)msg, json); @@ -394,13 +395,13 @@ namespace MeoAsstGui case AsstMsg.AllTasksCompleted: bool isMainTaskQueueAllCompleted = true; - var runned_tasks = details["runned_tasks"] as JArray; - if (runned_tasks.Count == 1) + var finished_tasks = details["finished_tasks"] as JArray; + if (finished_tasks.Count == 1) { - var unique_runned_task = (TaskId)runned_tasks[0]; - if (unique_runned_task == (_latestTaskId.TryGetValue(TaskType.Copilot, out var copilotTaskId) ? copilotTaskId : 0) - || unique_runned_task == (_latestTaskId.TryGetValue(TaskType.RecruitCalc, out var recruitCalcTaskId) ? recruitCalcTaskId : 0) - || unique_runned_task == (_latestTaskId.TryGetValue(TaskType.CloseDown, out var closeDownTaskId) ? closeDownTaskId : 0)) + var unique_finished_task = (TaskId)finished_tasks[0]; + if (unique_finished_task == (_latestTaskId.TryGetValue(TaskType.Copilot, out var copilotTaskId) ? copilotTaskId : 0) + || unique_finished_task == (_latestTaskId.TryGetValue(TaskType.RecruitCalc, out var recruitCalcTaskId) ? recruitCalcTaskId : 0) + || unique_finished_task == (_latestTaskId.TryGetValue(TaskType.CloseDown, out var closeDownTaskId) ? closeDownTaskId : 0)) { isMainTaskQueueAllCompleted = false; } @@ -888,9 +889,9 @@ namespace MeoAsstGui /// 连接模拟器。 /// /// 具体的连接错误。 - /// 是否为第一次尝试。 + /// 是否为第一次尝试。 /// 是否成功。 - public bool AsstConnect(ref string error, bool firsttry = false) + public bool AsstConnect(ref string error, bool first_try = false) { if (!LoadGlobalResource()) { @@ -935,7 +936,7 @@ namespace MeoAsstGui if (!ret) { - if (firsttry) + if (first_try) { error = Localization.GetString("ConnectFailed") + "\n" + Localization.GetString("TryToStartEmulator"); } @@ -1091,14 +1092,14 @@ namespace MeoAsstGui /// 领取信用及商店购物。 /// /// 是否购物。 - /// 优先购买列表。 + /// 优先购买列表。 /// 黑名单列表。 /// 是否成功。 - public bool AsstAppendMall(bool with_shopping, string[] firstlist, string[] blacklist) + public bool AsstAppendMall(bool with_shopping, string[] first_list, string[] blacklist) { var task_params = new JObject(); task_params["shopping"] = with_shopping; - task_params["buy_first"] = new JArray { firstlist }; + task_params["buy_first"] = new JArray { first_list }; task_params["blacklist"] = new JArray { blacklist }; TaskId id = AsstAppendTaskWithEncoding("Mall", task_params); _latestTaskId[TaskType.Mall] = id; diff --git a/src/MeoAsstGui/Helper/ToastNotification.cs b/src/MeoAsstGui/Helper/ToastNotification.cs index e141c2dbf1..2f03464386 100644 --- a/src/MeoAsstGui/Helper/ToastNotification.cs +++ b/src/MeoAsstGui/Helper/ToastNotification.cs @@ -33,7 +33,7 @@ using Notification.Wpf.Controls; namespace MeoAsstGui { /// - /// The toast noficiation. + /// The toast notification. /// public class ToastNotification : IDisposable { @@ -524,6 +524,7 @@ namespace MeoAsstGui #region 任务栏闪烁 #pragma warning disable SA1307 // Accessible fields should begin with upper-case letter + /// /// 闪烁信息 /// diff --git a/src/MeoAsstGui/Helper/TrayIcon.cs b/src/MeoAsstGui/Helper/TrayIcon.cs index b1bf37cc05..e181a97e92 100644 --- a/src/MeoAsstGui/Helper/TrayIcon.cs +++ b/src/MeoAsstGui/Helper/TrayIcon.cs @@ -168,7 +168,7 @@ namespace MeoAsstGui } /// - /// Sets visiblility. + /// Sets visibility. /// /// Whether it is visible. public void SetVisible(bool visible) diff --git a/src/MeoAsstGui/Helper/WinAdapter.cs b/src/MeoAsstGui/Helper/WinAdapter.cs index 30db2324af..22ef34087a 100644 --- a/src/MeoAsstGui/Helper/WinAdapter.cs +++ b/src/MeoAsstGui/Helper/WinAdapter.cs @@ -53,7 +53,7 @@ namespace MeoAsstGui { "XYAZ", new List { ".\\adb.exe" } }, }; - private readonly Dictionary adbAbsoultePathDict = new Dictionary(); + private readonly Dictionary adbAbsolutePathDict = new Dictionary(); /// /// Refreshes emulator information. @@ -75,7 +75,7 @@ namespace MeoAsstGui var adbPath = Path.GetDirectoryName(processPath) + "\\" + path; if (File.Exists(adbPath)) { - adbAbsoultePathDict.Add(emulatorId, adbPath); + adbAbsolutePathDict.Add(emulatorId, adbPath); } } } @@ -91,9 +91,9 @@ namespace MeoAsstGui /// The ADB path of the emulator. public string GetAdbPathByEmulatorName(string emulatorName) { - if (adbAbsoultePathDict.Keys.Contains(emulatorName)) + if (adbAbsolutePathDict.Keys.Contains(emulatorName)) { - return adbAbsoultePathDict[emulatorName]; + return adbAbsolutePathDict[emulatorName]; } return null; diff --git a/src/MeoAsstGui/Resources/Localizations/en-us.xaml b/src/MeoAsstGui/Resources/Localizations/en-us.xaml index 19780853b2..dce1d1fb1a 100644 --- a/src/MeoAsstGui/Resources/Localizations/en-us.xaml +++ b/src/MeoAsstGui/Resources/Localizations/en-us.xaml @@ -105,8 +105,8 @@ Penguin Report ID(Number part only) Social Point shopping - Whitelist(split by space) - Blacklist(split by space) + Whitelist (split by space) + Blacklist (split by space) Would you like a drink🍷? doctor Drone Usage diff --git a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs index b6b5a704b2..dcb7022d7e 100644 --- a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs +++ b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs @@ -1654,6 +1654,7 @@ namespace MeoAsstGui /* 界面设置 */ #pragma warning disable SA1401 // Fields should be private + /// /// Gets or sets a value indicating whether to use tray icon. /// diff --git a/src/MeoAsstGui/ViewModels/StartSelfModel.cs b/src/MeoAsstGui/ViewModels/StartSelfModel.cs index ed80fdadb3..0b9ee91f1f 100644 --- a/src/MeoAsstGui/ViewModels/StartSelfModel.cs +++ b/src/MeoAsstGui/ViewModels/StartSelfModel.cs @@ -17,7 +17,7 @@ using Microsoft.Win32; namespace MeoAsstGui { /// - /// The model of autostarting settings. + /// The model of auto-starting settings. /// public class StartSelfModel {