From fa972811af03c7f36fea8fddf03093403dc636e8 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sun, 31 Jul 2022 15:29:33 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E9=A2=9D=E5=A4=96=E6=BB=91=E5=8A=A8=E8=B7=9D=E7=A6=BB=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E7=9F=A5=E9=81=93=E5=AF=B9=E5=9F=BA=E5=BB=BA=E8=AF=AF?= =?UTF-8?q?=E8=A7=A6=E6=9C=89=E6=B2=A1=E6=9C=89=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/config.json b/resource/config.json index 4569eaca06..93910c8694 100644 --- a/resource/config.json +++ b/resource/config.json @@ -8,7 +8,7 @@ 0 ], "controlDelayRange_Doc": "点击随机延时:每次点击操作会进行随机延时,降低封号风险(好像也没听说过谁被封号的)。格式为 [ 最小延时, 最大延时 ],单位为毫秒。例如想设置3~5秒延时,即修改为[ 3000, 5000 ],默认0~0", - "adbExtraSwipeDist": 50, + "adbExtraSwipeDist": 100, "adbExtraSwipeDist_Doc": "额外的滑动距离:adb有bug,同样的参数,偶尔会划得非常远。额外做一个短程滑动,把之前的停下来", "adbExtraSwipeDuration": 1000, "adbExtraSwipeDuration_Doc": "额外的滑动持续时间:adb有bug,同样的参数,偶尔会划得非常远。额外做一个短程滑动,把之前的停下来。若小于0,则关闭额外滑动功能", From e319ddf4a902d56642c3290d2109f2bda2eefb34 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sun, 31 Jul 2022 16:20:55 +0800 Subject: [PATCH 2/7] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=82=89?= =?UTF-8?q?=E9=B8=BD=E8=B4=AD=E7=89=A9=E9=80=BB=E8=BE=91=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E8=81=8C=E4=B8=9A=E6=94=B9=E4=B8=BA=E6=95=B0=E7=BB=84=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E6=96=B0=E5=A2=9E=20chars=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/roguelike_shopping.json | 42 +++++++++---------- .../RoguelikeShoppingConfiger.cpp | 40 +++++++++++------- src/MeoAssistant/RoguelikeShoppingConfiger.h | 3 +- .../RoguelikeShoppingTaskPlugin.cpp | 40 ++++++++++++------ 4 files changed, 75 insertions(+), 50 deletions(-) diff --git a/resource/roguelike_shopping.json b/resource/roguelike_shopping.json index 8946f9dd82..33343598e4 100644 --- a/resource/roguelike_shopping.json +++ b/resource/roguelike_shopping.json @@ -23,7 +23,7 @@ }, { "name": "残弩-典训", - "role": "SNIPER", + "roles": [ "SNIPER" ], "promotion": 1 }, { @@ -37,7 +37,7 @@ }, { "name": "折戟-浴血", - "role": "WARRIOR" + "roles": [ "WARRIOR" ] }, { "name": "四叶草化石" @@ -47,7 +47,7 @@ }, { "name": "残弩-神速", - "role": "SNIPER" + "roles": [ "SNIPER" ] }, { "name": "锈蚀的铁锤" @@ -79,7 +79,7 @@ }, { "name": "折戟-典训", - "role": "WARRIOR", + "roles": [ "WARRIOR" ], "promotion": 1 }, { @@ -90,14 +90,14 @@ }, { "name": "折戟-一夫当关", - "role": "WARRIOR" + "roles": [ "WARRIOR" ] }, { "name": "“时光之末”" }, { "name": "钝爪-典训", - "role": "PIONEER", + "roles": [ "PIONEER" ], "promotion": 1 }, { @@ -105,7 +105,7 @@ }, { "name": "折戟-锋刃", - "role": "WARRIOR" + "roles": [ "WARRIOR" ] }, { "name": "苦行者泡芙" @@ -115,7 +115,7 @@ }, { "name": "断杖-典训", - "role": "CASTER", + "roles": [ "CASTER" ], "promotion": 1 }, { @@ -138,7 +138,7 @@ }, { "name": "折戟-破釜沉舟", - "role": "WARRIOR" + "roles": [ "WARRIOR" ] }, { "name": "难闻的止血剂" @@ -157,14 +157,14 @@ }, { "name": "折戟-突破", - "role": "WARRIOR" + "roles": [ "WARRIOR" ] }, { "name": "“当红歌手”" }, { "name": "残弩-百步穿杨", - "role": "SNIPER" + "roles": [ "SNIPER" ] }, { "name": "爱丽舍钱袋" @@ -183,7 +183,7 @@ }, { "name": "断杖-织法者", - "role": "CASTER" + "roles": [ "CASTER" ] }, { "name": "“法术杀手”" @@ -199,7 +199,7 @@ }, { "name": "断杖-咏唱", - "role": "CASTER" + "roles": [ "CASTER" ] }, { "name": "苍白花冠" @@ -215,11 +215,11 @@ }, { "name": "钝爪-爆发", - "role": "PIONEER" + "roles": [ "PIONEER" ] }, { "name": "支柱-典训", - "role": "SUPPORT", + "roles": [ "SUPPORT" ], "promotion": 1 }, { @@ -249,7 +249,7 @@ }, { "name": "钝爪-百战", - "role": "PIONEER" + "roles": [ "PIONEER" ] }, { "name": "至宝指环", @@ -257,7 +257,7 @@ }, { "name": "残弩-战场依存", - "role": "SNIPER" + "roles": [ "SNIPER" ] }, { "name": "贵族刺剑" @@ -270,7 +270,7 @@ }, { "name": "医者-妙手", - "role": "MEDIC" + "roles": [ "MEDIC" ] }, { "name": "设计师量尺" @@ -289,7 +289,7 @@ }, { "name": "断杖-凝神", - "role": "CASTER" + "roles": [ "CASTER" ] }, { "name": "铁棍面包" @@ -332,11 +332,11 @@ }, { "name": "医者-理智固剂", - "role": "MEDIC" + "roles": [ "MEDIC" ] }, { "name": "钝爪-熟稔", - "role": "PIONEER" + "roles": [ "PIONEER" ] }, { "name": "古怪的长笛" diff --git a/src/MeoAssistant/RoguelikeShoppingConfiger.cpp b/src/MeoAssistant/RoguelikeShoppingConfiger.cpp index 4d6e7b5034..d26d69bc62 100644 --- a/src/MeoAssistant/RoguelikeShoppingConfiger.cpp +++ b/src/MeoAssistant/RoguelikeShoppingConfiger.cpp @@ -6,24 +6,34 @@ bool asst::RoguelikeShoppingConfiger::parse(const json::value& json) { for (const auto& goods_json : json.as_array()) { std::string name = goods_json.at("name").as_string(); - static const std::unordered_map RoleMap = { - { "CASTER", BattleRole::Caster }, - { "MEDIC", BattleRole::Medic }, - { "PIONEER", BattleRole::Pioneer }, - { "SNIPER", BattleRole::Sniper}, - { "SPECIAL", BattleRole::Special}, - { "SUPPORT", BattleRole::Support}, - { "TANK", BattleRole::Tank}, - { "WARRIOR", BattleRole::Warrior}, - }; - BattleRole role = BattleRole::Unknown; - std::string str_role = goods_json.get("role", ""); - if (!str_role.empty()) { - role = RoleMap.at(str_role); + + std::vector roles; + if (auto roles_opt = goods_json.find("roles")) { + for (const auto& role_json : roles_opt.value()) { + static const std::unordered_map RoleMap = { + { "CASTER", BattleRole::Caster }, + { "MEDIC", BattleRole::Medic }, + { "PIONEER", BattleRole::Pioneer }, + { "SNIPER", BattleRole::Sniper}, + { "SPECIAL", BattleRole::Special}, + { "SUPPORT", BattleRole::Support}, + { "TANK", BattleRole::Tank}, + { "WARRIOR", BattleRole::Warrior}, + }; + roles.emplace_back(RoleMap.at(role_json.as_string())); + } } + std::vector chars; + if (auto chars_opt = goods_json.find("chars")) { + for (const auto& char_json : chars_opt.value()) { + chars.emplace_back(char_json.as_string()); + } + } + RoguelikeGoods goods; goods.name = std::move(name); - goods.role_restriction = role; + goods.roles = std::move(roles); + goods.chars = std::move(chars); goods.promotion = goods_json.get("promotion", 0); goods.no_longer_buy = goods_json.get("no_longer_buy", false); goods.ignore_no_longer_buy = goods_json.get("ignore_no_longer_buy", false); diff --git a/src/MeoAssistant/RoguelikeShoppingConfiger.h b/src/MeoAssistant/RoguelikeShoppingConfiger.h index 3259357926..e0775558f2 100644 --- a/src/MeoAssistant/RoguelikeShoppingConfiger.h +++ b/src/MeoAssistant/RoguelikeShoppingConfiger.h @@ -11,7 +11,8 @@ namespace asst struct RoguelikeGoods { std::string name; - BattleRole role_restriction = BattleRole::Unknown; + std::vector roles; + std::vector chars; int promotion = 0; // 晋升 N 个干员 bool no_longer_buy = false; bool ignore_no_longer_buy = false; diff --git a/src/MeoAssistant/RoguelikeShoppingTaskPlugin.cpp b/src/MeoAssistant/RoguelikeShoppingTaskPlugin.cpp index ee536ac23e..3252992bbf 100644 --- a/src/MeoAssistant/RoguelikeShoppingTaskPlugin.cpp +++ b/src/MeoAssistant/RoguelikeShoppingTaskPlugin.cpp @@ -44,6 +44,7 @@ bool asst::RoguelikeShoppingTaskPlugin::_run() json::value json_chars_info = json::parse(str_chars_info).value_or(json::value()); std::unordered_map map_roles_count; + std::unordered_set chars_list; for (auto& [name, json_info] : json_chars_info.as_object()) { int elite = static_cast(json_info.get("elite", 0)); int level = static_cast(json_info.get("level", 0)); @@ -54,19 +55,14 @@ bool asst::RoguelikeShoppingTaskPlugin::_run() continue; } + chars_list.emplace(name); + if (name == "阿米娅") { map_roles_count[BattleRole::Caster] += 1; map_roles_count[BattleRole::Warrior] += 1; } else { - BattleRole role = BattleRole::Unknown; - auto int_role = json_info.get("role", 0); - if (int_role) { - role = static_cast(int_role); - } - else { - role = Resrc.battle_data().get_role(name); - } + BattleRole role = Resrc.battle_data().get_role(name); map_roles_count[role] += 1; } } @@ -91,11 +87,29 @@ bool asst::RoguelikeShoppingTaskPlugin::_run() continue; } - if (goods.role_restriction != BattleRole::Unknown - && map_roles_count[goods.role_restriction] == 0) { - Log.trace("Ready to buy", goods.name, static_cast(goods.role_restriction), - ", but there is no such professional operator, skip"); - continue; + if (!goods.roles.empty()) { + bool role_mathced = false; + for (const auto& role : goods.roles) { + if (map_roles_count[role] != 0) { + role_mathced = true; + break; + } + } + if (!role_mathced) { + Log.trace("Ready to buy", goods.name, + ", but there is no such professional operator, skip"); + continue; + } + } + + if (!goods.chars.empty()) { + auto iter = std::find_first_of(chars_list.cbegin(), chars_list.cend(), + goods.chars.cbegin(), goods.chars.cend()); + if (iter == chars_list.cend()) { + Log.trace("Ready to buy", goods.name, + ", but there is no such character, skip"); + continue; + } } // 这里仅点一下收藏品,原本的 ProcessTask 还会再点一下,但它是由 rect_move 的,保证不会点出去 From 5de783ed2956853781ed6bbc6109b0e039486725 Mon Sep 17 00:00:00 2001 From: zzyyyl Date: Sun, 31 Jul 2022 15:39:03 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20c++17=20?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E4=BD=86=E6=98=AF=20c++20=20=E6=9C=89?= =?UTF-8?q?=E7=9A=84=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MeoAssistant/AsstTypes.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/MeoAssistant/AsstTypes.h b/src/MeoAssistant/AsstTypes.h index 96db89c87e..86d3059d2f 100644 --- a/src/MeoAssistant/AsstTypes.h +++ b/src/MeoAssistant/AsstTypes.h @@ -139,6 +139,9 @@ friend Point& operator Op##= (Point& val, const Point& opd) noexcept { val.x Op# ~TextRect() = default; TextRect(const TextRect&) = default; TextRect(TextRect&&) noexcept = default; + explicit TextRect(double score, const Rect& rect, const std::string& text) + : score(score), rect(rect), text(text) + {} explicit operator std::string() const noexcept { return text; } explicit operator Rect() const noexcept { return rect; } @@ -178,6 +181,9 @@ friend Point& operator Op##= (Point& val, const Point& opd) noexcept { val.x Op# ~MatchRect() = default; MatchRect(const MatchRect&) = default; MatchRect(MatchRect&&) noexcept = default; + explicit MatchRect(double score, const Rect& rect) + : score(score), rect(rect) + {} explicit operator Rect() const noexcept { return rect; } MatchRect& operator=(const MatchRect&) = default; From 349f7635b617f6fca1a755722540ba1a32c422a5 Mon Sep 17 00:00:00 2001 From: zzyyyl Date: Sun, 31 Jul 2022 17:39:24 +0800 Subject: [PATCH 4/7] =?UTF-8?q?style:=20=E5=AF=B9=E9=BD=90=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=E8=A2=AB=20code=20tidy=20=E6=89=93=E4=B9=B1=E7=9A=84?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MeoAssistant/AsstInfrastDef.h | 8 ++++---- src/MeoAssistant/AsstTypes.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MeoAssistant/AsstInfrastDef.h b/src/MeoAssistant/AsstInfrastDef.h index 92641f7335..13107243c5 100644 --- a/src/MeoAssistant/AsstInfrastDef.h +++ b/src/MeoAssistant/AsstInfrastDef.h @@ -40,8 +40,8 @@ namespace asst::infrast std::vector names; // 很多基建技能是一样的,就是名字不同。所以一个技能id可能对应多个名字 std::string desc; std::unordered_map efficient; // 技能效率,key:产品名(赤金、经验书等), value: 效率数值 - std::unordered_map efficient_regex; // 技能效率正则,key:产品名(赤金、经验书等), value: 效率正则。如不为空,会先对正则进行计算,再加上efficient里面的值 - int max_num = INT_MAX; // 最多选几个该技能 + std::unordered_map efficient_regex; // 技能效率正则,key:产品名(赤金、经验书等), value: 效率正则。如不为空,会先对正则进行计算,再加上efficient里面的值 + int max_num = INT_MAX; // 最多选几个该技能 bool operator==(const Skill& skill) const noexcept { @@ -66,7 +66,7 @@ namespace asst::infrast { struct Oper { - std::string face_hash; // 有些干员的技能是完全一样的,做个hash区分一下不同干员 + std::string face_hash; // 有些干员的技能是完全一样的,做个hash区分一下不同干员 Smiley smiley; double mood_ratio = 0; // 心情进度条的百分比 Doing doing = Doing::Invalid; @@ -113,7 +113,7 @@ namespace asst::infrast std::unordered_map conditions; // 技能组合可用条件,例如:key 发电站数量,value 3 std::vector necessary; // 必选技能。这里面的缺少任一,则该技能组合不可用 std::vector optional; // 可选技能。 - bool allow_external = false; // 当干员数没满3个的时候,是否允许补充外部干员 + bool allow_external = false; // 当干员数没满3个的时候,是否允许补充外部干员 }; enum class WorkMode diff --git a/src/MeoAssistant/AsstTypes.h b/src/MeoAssistant/AsstTypes.h index 86d3059d2f..8bfa91dd05 100644 --- a/src/MeoAssistant/AsstTypes.h +++ b/src/MeoAssistant/AsstTypes.h @@ -250,8 +250,8 @@ namespace asst TaskInfo(TaskInfo&&) noexcept = default; TaskInfo& operator=(const TaskInfo&) = default; TaskInfo& operator=(TaskInfo&&) noexcept = default; - std::string name; // 任务名 - AlgorithmType algorithm = // 图像算法类型 + std::string name; // 任务名 + AlgorithmType algorithm = // 图像算法类型 AlgorithmType::Invalid; ProcessTaskAction action = // 要进行的操作 ProcessTaskAction::Invalid; @@ -262,7 +262,7 @@ namespace asst std::vector exceeded_next; // 达到最多次数了之后,下一个可能的任务(列表) std::vector on_error_next; // 任务出错之后要去执行什么 std::vector reduce_other_times; // 执行了该任务后,需要减少别的任务的执行次数。例如执行了吃理智药,则说明上一次点击蓝色开始行动按钮没生效,所以蓝色开始行动要-1 - Rect specific_rect; // 指定区域,目前仅针对ClickRect任务有用,会点这个区域 + Rect specific_rect; // 指定区域,目前仅针对ClickRect任务有用,会点这个区域 int pre_delay = 0; // 执行该任务前的延时 int rear_delay = 0; // 执行该任务后的延时 int retry_times = INT_MAX; // 未找到图像时的重试次数 @@ -310,7 +310,7 @@ namespace asst HashTaskInfo(HashTaskInfo&&) noexcept = default; HashTaskInfo& operator=(const HashTaskInfo&) = default; HashTaskInfo& operator=(HashTaskInfo&&) noexcept = default; - std::vector hashes; // 需要多个哈希值 + std::vector hashes; // 需要多个哈希值 int dist_threshold = 0; // 汉明距离阈值 std::pair mask_range; // 掩码的二值化范围 bool bound = false; // 是否裁剪周围黑边 From fb6fbfc77e372cdbb6bf0f54dcda062363d19a68 Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Sun, 31 Jul 2022 18:23:35 +0800 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E8=82=89?= =?UTF-8?q?=E9=B8=BD=E5=95=86=E5=BA=97=E8=B4=AD=E4=B9=B0=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/roguelike_shopping.json | 529 +++++++++++++++++-------------- 1 file changed, 293 insertions(+), 236 deletions(-) diff --git a/resource/roguelike_shopping.json b/resource/roguelike_shopping.json index 33343598e4..1ab2678b84 100644 --- a/resource/roguelike_shopping.json +++ b/resource/roguelike_shopping.json @@ -1,11 +1,18 @@ [ { - "name": "金酒之杯", - "no_longer_buy": true, - "ignore_no_longer_buy": true + "name": "扩散之手", + "chars": [ + "异客" + ] }, { - "name": "投币玩具", + "name": "撕扯之手", + "chars": [ + "帕拉斯" + ] + }, + { + "name": "金酒之杯", "no_longer_buy": true, "ignore_no_longer_buy": true }, @@ -14,16 +21,19 @@ "no_longer_buy": true, "ignore_no_longer_buy": true }, + { + "name": "投币玩具", + "no_longer_buy": true, + "ignore_no_longer_buy": true + }, { "name": "人事部密信" }, - { - "name": "Miss.Christine摸摸券", - "promotion": 2 - }, { "name": "残弩-典训", - "roles": [ "SNIPER" ], + "roles": [ + "SNIPER" + ], "promotion": 1 }, { @@ -33,102 +43,114 @@ "name": "073号安全试剂" }, { - "name": "《第二经济改革法》" + "name": "Miss.Christine摸摸券", + "promotion": 2 + }, + { + "name": "残弩-神速", + "roles": [ + "SNIPER" + ] }, { "name": "折戟-浴血", - "roles": [ "WARRIOR" ] + "roles": [ + "WARRIOR" + ] + }, + { + "name": "玻璃小鸟" }, { "name": "四叶草化石" }, + { + "name": "赤金的远征" + }, + { + "name": "《第二经济改革法》" + }, { "name": "长生者之证" }, { - "name": "残弩-神速", - "roles": [ "SNIPER" ] + "name": "锈蚀的铁锤" }, { - "name": "锈蚀的铁锤" + "name": "被撬开的道具箱" }, { "name": "尖笑鬼牌", "promotion": 1 }, { - "name": "赤金的远征" - }, - { - "name": "玻璃小鸟" + "name": "石像鬼塑像" }, { "name": "《杜林地上环游记》" }, - { - "name": "高卢银行支票" - }, { "name": "血魔的寝床" }, - { - "name": "石像鬼塑像" - }, - { - "name": "被撬开的道具箱" - }, - { - "name": "折戟-典训", - "roles": [ "WARRIOR" ], - "promotion": 1 - }, - { - "name": "全局作战文件" - }, { "name": "特殊抑制器" }, { - "name": "折戟-一夫当关", - "roles": [ "WARRIOR" ] + "name": "高卢银行支票" + }, + { + "name": "折戟-典训", + "roles": [ + "WARRIOR" + ], + "promotion": 1 }, { "name": "“时光之末”" }, { - "name": "钝爪-典训", - "roles": [ "PIONEER" ], - "promotion": 1 + "name": "折戟-一夫当关", + "roles": [ + "WARRIOR" + ] + }, + { + "name": "折戟-破釜沉舟", + "roles": [ + "WARRIOR" + ] + }, + { + "name": "全局作战文件" + }, + { + "name": "折戟-锋刃", + "roles": [ + "WARRIOR" + ] }, { "name": "皇家利口酒" }, { - "name": "折戟-锋刃", - "roles": [ "WARRIOR" ] + "name": "古旧乐谱残章" }, { "name": "苦行者泡芙" }, - { - "name": "古旧乐谱残章" - }, { "name": "断杖-典训", - "roles": [ "CASTER" ], + "roles": [ + "CASTER" + ], "promotion": 1 }, { - "name": "高卢小圆饼" - }, - { - "name": "老蒲扇" - }, - { - "name": "蓝色丝巾" - }, - { - "name": "微缩舞台模型" + "name": "钝爪-典训", + "roles": [ + "PIONEER" + ], + "promotion": 1 }, { "name": "乌萨斯列巴" @@ -137,175 +159,202 @@ "name": "万能钥匙" }, { - "name": "折戟-破釜沉舟", - "roles": [ "WARRIOR" ] + "name": "微缩舞台模型" }, { - "name": "难闻的止血剂" + "name": "残弩-百步穿杨", + "roles": [ + "SNIPER" + ] + }, + { + "name": "高卢小圆饼" + }, + { + "name": "蓝色丝巾" }, { "name": "猩红剧团票根" }, { - "name": "源石鸢尾花" + "name": "“法术杀手”" }, { - "name": "女妖之吻" + "name": "老蒲扇" }, { - "name": "突击协议-利刃" - }, - { - "name": "折戟-突破", - "roles": [ "WARRIOR" ] - }, - { - "name": "“当红歌手”" - }, - { - "name": "残弩-百步穿杨", - "roles": [ "SNIPER" ] - }, - { - "name": "爱丽舍钱袋" - }, - { - "name": "迷迭香之拥" - }, - { - "name": "莱塔尼亚荣誉勋章" + "name": "难闻的止血剂" }, { "name": "空白名片" }, { - "name": "银餐叉" + "name": "折戟-突破", + "roles": [ + "WARRIOR" + ] }, { - "name": "断杖-织法者", - "roles": [ "CASTER" ] - }, - { - "name": "“法术杀手”" - }, - { - "name": "红色蝴蝶结" - }, - { - "name": "“黑夜呢喃”" - }, - { - "name": "悬丝傀儡" - }, - { - "name": "断杖-咏唱", - "roles": [ "CASTER" ] - }, - { - "name": "苍白花冠" + "name": "源石鸢尾花" }, { "name": "Scout的狙击镜" }, + { + "name": "断杖-织法者", + "roles": [ + "CASTER" + ] + }, + { + "name": "维多利亚“废铁”勋章" + }, + { + "name": "银餐叉" + }, + { + "name": "“当红歌手”" + }, + { + "name": "迷迭香之拥" + }, { "name": "制式防暴用具" }, + { + "name": "爱丽舍钱袋" + }, + { + "name": "突击协议-利刃", + "roles": [ + "WARRIOR", + "PIONEER" + ] + }, + { + "name": "莱塔尼亚荣誉勋章" + }, + { + "name": "女妖之吻" + }, + { + "name": "至宝指环" + }, { "name": "维多利亚蛋糕" }, { - "name": "钝爪-爆发", - "roles": [ "PIONEER" ] + "name": "幸运硬币" }, { - "name": "支柱-典训", - "roles": [ "SUPPORT" ], - "promotion": 1 + "name": "“黑夜呢喃”" }, { - "name": "皇帝的收藏" + "name": "红色蝴蝶结" }, { - "name": "作者的喉舌" + "name": "残弩-战场依存", + "roles": [ + "SNIPER" + ] + }, + { + "name": "苍白花冠" }, { "name": "香草沙士汽水" }, { - "name": "幸运硬币", - "ignore_no_longer_buy": true + "name": "镶金骨骰" }, { - "name": "镶金骨骰" + "name": "钝爪-爆发", + "roles": [ + "PIONEER" + ] + }, + { + "name": "支柱-典训", + "roles": [ + "SUPPORT" + ], + "promotion": 1 + }, + { + "name": "断杖-咏唱", + "roles": [ + "CASTER" + ] + }, + { + "name": "悬丝傀儡" }, { "name": "古高卢银币" }, - { - "name": "赶车夫的长鞭" - }, - { - "name": "迷梦香精" - }, - { - "name": "钝爪-百战", - "roles": [ "PIONEER" ] - }, - { - "name": "至宝指环", - "ignore_no_longer_buy": true - }, - { - "name": "残弩-战场依存", - "roles": [ "SNIPER" ] - }, - { - "name": "贵族刺剑" - }, - { - "name": "人偶之家" - }, - { - "name": "《旧高卢地名源流考》" - }, - { - "name": "医者-妙手", - "roles": [ "MEDIC" ] - }, { "name": "设计师量尺" }, + { + "name": "作者的喉舌" + }, { "name": "“绽放”" }, + { + "name": "迷梦香精" + }, + { + "name": "断杖-凝神", + "roles": [ + "CASTER" + ] + }, { "name": "锈蚀刀片" }, { - "name": "破坏协议-消除" + "name": "贵族刺剑" }, { "name": "急救药箱" }, { - "name": "断杖-凝神", - "roles": [ "CASTER" ] + "name": "铁棍面包" }, { - "name": "铁棍面包" + "name": "赶车夫的长鞭" + }, + { + "name": "人偶之家" + }, + { + "name": "皇帝的收藏" + }, + { + "name": "医者-妙手", + "roles": [ + "MEDIC" + ] + }, + { + "name": "钝爪-百战", + "roles": [ + "PIONEER" + ] + }, + { + "name": "黄铜指南针" + }, + { + "name": "路线说明图" }, { "name": "摩根队长佳酿" }, - { - "name": "破坏协议-消除" - }, { "name": "“噤声”" }, - { - "name": "远程协议-遥击" - }, { "name": "“童趣玩偶”" }, @@ -313,117 +362,125 @@ "name": "试制巧克力" }, { - "name": "远程协议-遥击" - }, - { - "name": "羽兽肝酱" - }, - { - "name": "地区行动方案" - }, - { - "name": "显圣吊坠" - }, - { - "name": "安洁莉娜的创想" - }, - { - "name": "路线说明图" - }, - { - "name": "医者-理智固剂", - "roles": [ "MEDIC" ] - }, - { - "name": "钝爪-熟稔", - "roles": [ "PIONEER" ] - }, - { - "name": "古怪的长笛" - }, - { - "name": "黄铜指南针" - }, - { - "name": "“聚焦”" - }, - { - "name": "皇族金胸针" - }, - { - "name": "活玫瑰" - }, - { - "name": "独奏八音盒" - }, - { - "name": "破损的面具" - }, - { - "name": "开裂的束缚带" - }, - { - "name": "生命之水" + "name": "《旧高卢地名源流考》" }, { "name": "舞者手链" }, + { + "name": "远程协议-遥击", + "roles": [ + "SNIPER", + "MEDIC" + ] + }, + { + "name": "显圣吊坠" + }, { "name": "异铁小圆盾" }, { - "name": "球球果汁" + "name": "地区行动方案" }, { - "name": "残破合影" + "name": "破坏协议-消除", + "roles": [ + "CASTER", + "SPECIAL" + ] }, { - "name": "女皇之愿" - }, - { - "name": "军团护心镜" - }, - { - "name": "精神治疗录像带" - }, - { - "name": "解约协议" - }, - { - "name": "皇帝的恩宠" - }, - { - "name": "食腐者手杖" - }, - { - "name": "荒地龙舌兰" - }, - { - "name": "“迷醉荷谟伊”" + "name": "安洁莉娜的创想" }, { "name": "演出用香水" }, { - "name": "昏暗的提灯" + "name": "“聚焦”" }, { - "name": "凯旋号角" + "name": "生命之水" }, { - "name": "假面舞会面具", - "ignore_no_longer_buy": true + "name": "荒地龙舌兰" + }, + { + "name": "独奏八音盒" + }, + { + "name": "古怪的长笛" + }, + { + "name": "球球果汁" + }, + { + "name": "羽兽肝酱" + }, + { + "name": "活玫瑰" + }, + { + "name": "钝爪-熟稔", + "roles": [ + "PIONEER" + ] + }, + { + "name": "医者-理智固剂", + "roles": [ + "MEDIC" + ] + }, + { + "name": "破损的面具" + }, + { + "name": "女皇之愿" + }, + { + "name": "皇帝的恩宠" }, { "name": "奇渊面具" }, { - "name": "“逝者垂泪”" + "name": "昏暗的提灯" + }, + { + "name": "皇族金胸针" + }, + { + "name": "开裂的束缚带" + }, + { + "name": "解约协议" + }, + { + "name": "军团护心镜" + }, + { + "name": "凯旋号角" + }, + { + "name": "精神治疗录像带" + }, + { + "name": "“迷醉荷谟伊”" + }, + { + "name": "食腐者手杖" + }, + { + "name": "残破合影" }, { "name": "高闪相机" }, { - "name": "维多利亚“废铁”勋章" + "name": "假面舞会面具" + }, + { + "name": "“逝者垂泪”" } ] From e3a0b340defeb2cd94d869250311ee622cd8bf55 Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Sun, 31 Jul 2022 18:32:19 +0800 Subject: [PATCH 6/7] =?UTF-8?q?feat:=20=E9=87=8D=E6=96=B0=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=BA=90=E7=9F=B3=E9=94=AD=E9=A2=9D=E5=A4=96=E6=8E=89?= =?UTF-8?q?=E8=90=BD=E8=97=8F=E5=93=81=E7=9A=84=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/roguelike_shopping.json | 327 ++++++++++++++++--------------- 1 file changed, 165 insertions(+), 162 deletions(-) diff --git a/resource/roguelike_shopping.json b/resource/roguelike_shopping.json index 1ab2678b84..dd8c3fa5c8 100644 --- a/resource/roguelike_shopping.json +++ b/resource/roguelike_shopping.json @@ -58,15 +58,18 @@ "WARRIOR" ] }, - { - "name": "玻璃小鸟" - }, { "name": "四叶草化石" }, + { + "name": "玻璃小鸟" + }, { "name": "赤金的远征" }, + { + "name": "锈蚀的铁锤" + }, { "name": "《第二经济改革法》" }, @@ -74,29 +77,26 @@ "name": "长生者之证" }, { - "name": "锈蚀的铁锤" + "name": "被撬开的道具箱" }, { - "name": "被撬开的道具箱" + "name": "石像鬼塑像" }, { "name": "尖笑鬼牌", "promotion": 1 }, { - "name": "石像鬼塑像" + "name": "血魔的寝床" }, { "name": "《杜林地上环游记》" }, - { - "name": "血魔的寝床" - }, { "name": "特殊抑制器" }, { - "name": "高卢银行支票" + "name": "“时光之末”" }, { "name": "折戟-典训", @@ -106,16 +106,16 @@ "promotion": 1 }, { - "name": "“时光之末”" + "name": "高卢银行支票" }, { - "name": "折戟-一夫当关", + "name": "折戟-破釜沉舟", "roles": [ "WARRIOR" ] }, { - "name": "折戟-破釜沉舟", + "name": "折戟-一夫当关", "roles": [ "WARRIOR" ] @@ -132,6 +132,13 @@ { "name": "皇家利口酒" }, + { + "name": "断杖-典训", + "roles": [ + "CASTER" + ], + "promotion": 1 + }, { "name": "古旧乐谱残章" }, @@ -139,11 +146,16 @@ "name": "苦行者泡芙" }, { - "name": "断杖-典训", - "roles": [ - "CASTER" - ], - "promotion": 1 + "name": "乌萨斯列巴" + }, + { + "name": "高卢小圆饼" + }, + { + "name": "微缩舞台模型" + }, + { + "name": "蓝色丝巾" }, { "name": "钝爪-典训", @@ -152,15 +164,6 @@ ], "promotion": 1 }, - { - "name": "乌萨斯列巴" - }, - { - "name": "万能钥匙" - }, - { - "name": "微缩舞台模型" - }, { "name": "残弩-百步穿杨", "roles": [ @@ -168,38 +171,29 @@ ] }, { - "name": "高卢小圆饼" - }, - { - "name": "蓝色丝巾" - }, - { - "name": "猩红剧团票根" + "name": "万能钥匙" }, { "name": "“法术杀手”" }, { - "name": "老蒲扇" + "name": "猩红剧团票根" }, { - "name": "难闻的止血剂" + "name": "老蒲扇" }, { "name": "空白名片" }, { - "name": "折戟-突破", - "roles": [ - "WARRIOR" - ] + "name": "难闻的止血剂" + }, + { + "name": "迷迭香之拥" }, { "name": "源石鸢尾花" }, - { - "name": "Scout的狙击镜" - }, { "name": "断杖-织法者", "roles": [ @@ -207,28 +201,21 @@ ] }, { - "name": "维多利亚“废铁”勋章" + "name": "“当红歌手”" }, { "name": "银餐叉" }, { - "name": "“当红歌手”" + "name": "Scout的狙击镜" }, { - "name": "迷迭香之拥" + "name": "维多利亚“废铁”勋章" }, { - "name": "制式防暴用具" - }, - { - "name": "爱丽舍钱袋" - }, - { - "name": "突击协议-利刃", + "name": "折戟-突破", "roles": [ - "WARRIOR", - "PIONEER" + "WARRIOR" ] }, { @@ -238,14 +225,29 @@ "name": "女妖之吻" }, { - "name": "至宝指环" + "name": "突击协议-利刃", + "roles": [ + "WARRIOR", + "PIONEER" + ] + }, + { + "name": "爱丽舍钱袋" + }, + { + "name": "至宝指环", + "ignore_no_longer_buy": true + }, + { + "name": "制式防暴用具" + }, + { + "name": "幸运硬币", + "ignore_no_longer_buy": true }, { "name": "维多利亚蛋糕" }, - { - "name": "幸运硬币" - }, { "name": "“黑夜呢喃”" }, @@ -259,11 +261,24 @@ ] }, { - "name": "苍白花冠" + "name": "断杖-咏唱", + "roles": [ + "CASTER" + ] + }, + { + "name": "支柱-典训", + "roles": [ + "SUPPORT" + ], + "promotion": 1 }, { "name": "香草沙士汽水" }, + { + "name": "悬丝傀儡" + }, { "name": "镶金骨骰" }, @@ -274,62 +289,19 @@ ] }, { - "name": "支柱-典训", - "roles": [ - "SUPPORT" - ], - "promotion": 1 - }, - { - "name": "断杖-咏唱", - "roles": [ - "CASTER" - ] - }, - { - "name": "悬丝傀儡" - }, - { - "name": "古高卢银币" - }, - { - "name": "设计师量尺" - }, - { - "name": "作者的喉舌" + "name": "苍白花冠" }, { "name": "“绽放”" }, { - "name": "迷梦香精" + "name": "作者的喉舌" }, { - "name": "断杖-凝神", - "roles": [ - "CASTER" - ] + "name": "设计师量尺" }, { - "name": "锈蚀刀片" - }, - { - "name": "贵族刺剑" - }, - { - "name": "急救药箱" - }, - { - "name": "铁棍面包" - }, - { - "name": "赶车夫的长鞭" - }, - { - "name": "人偶之家" - }, - { - "name": "皇帝的收藏" + "name": "古高卢银币" }, { "name": "医者-妙手", @@ -337,6 +309,9 @@ "MEDIC" ] }, + { + "name": "急救药箱" + }, { "name": "钝爪-百战", "roles": [ @@ -344,7 +319,34 @@ ] }, { - "name": "黄铜指南针" + "name": "皇帝的收藏" + }, + { + "name": "断杖-凝神", + "roles": [ + "CASTER" + ] + }, + { + "name": "铁棍面包" + }, + { + "name": "迷梦香精" + }, + { + "name": "赶车夫的长鞭" + }, + { + "name": "人偶之家" + }, + { + "name": "锈蚀刀片" + }, + { + "name": "贵族刺剑" + }, + { + "name": "《旧高卢地名源流考》" }, { "name": "路线说明图" @@ -352,37 +354,21 @@ { "name": "摩根队长佳酿" }, + { + "name": "试制巧克力" + }, + { + "name": "黄铜指南针" + }, { "name": "“噤声”" }, { "name": "“童趣玩偶”" }, - { - "name": "试制巧克力" - }, - { - "name": "《旧高卢地名源流考》" - }, - { - "name": "舞者手链" - }, - { - "name": "远程协议-遥击", - "roles": [ - "SNIPER", - "MEDIC" - ] - }, { "name": "显圣吊坠" }, - { - "name": "异铁小圆盾" - }, - { - "name": "地区行动方案" - }, { "name": "破坏协议-消除", "roles": [ @@ -390,29 +376,27 @@ "SPECIAL" ] }, + { + "name": "远程协议-遥击", + "roles": [ + "SNIPER", + "MEDIC" + ] + }, + { + "name": "地区行动方案" + }, + { + "name": "舞者手链" + }, { "name": "安洁莉娜的创想" }, { - "name": "演出用香水" + "name": "异铁小圆盾" }, { - "name": "“聚焦”" - }, - { - "name": "生命之水" - }, - { - "name": "荒地龙舌兰" - }, - { - "name": "独奏八音盒" - }, - { - "name": "古怪的长笛" - }, - { - "name": "球球果汁" + "name": "破损的面具" }, { "name": "羽兽肝酱" @@ -420,12 +404,33 @@ { "name": "活玫瑰" }, + { + "name": "“聚焦”" + }, { "name": "钝爪-熟稔", "roles": [ "PIONEER" ] }, + { + "name": "独奏八音盒" + }, + { + "name": "球球果汁" + }, + { + "name": "古怪的长笛" + }, + { + "name": "女皇之愿" + }, + { + "name": "荒地龙舌兰" + }, + { + "name": "演出用香水" + }, { "name": "医者-理智固剂", "roles": [ @@ -433,13 +438,7 @@ ] }, { - "name": "破损的面具" - }, - { - "name": "女皇之愿" - }, - { - "name": "皇帝的恩宠" + "name": "生命之水" }, { "name": "奇渊面具" @@ -450,6 +449,9 @@ { "name": "皇族金胸针" }, + { + "name": "皇帝的恩宠" + }, { "name": "开裂的束缚带" }, @@ -457,14 +459,14 @@ "name": "解约协议" }, { - "name": "军团护心镜" - }, - { - "name": "凯旋号角" + "name": "残破合影" }, { "name": "精神治疗录像带" }, + { + "name": "军团护心镜" + }, { "name": "“迷醉荷谟伊”" }, @@ -472,14 +474,15 @@ "name": "食腐者手杖" }, { - "name": "残破合影" + "name": "凯旋号角" + }, + { + "name": "假面舞会面具", + "ignore_no_longer_buy": true }, { "name": "高闪相机" }, - { - "name": "假面舞会面具" - }, { "name": "“逝者垂泪”" } From 12f7e80b7a1f5825d952755174cd479a7832c585 Mon Sep 17 00:00:00 2001 From: lhhxxxxx <91231470+lhhxxxxx@users.noreply.github.com> Date: Sun, 31 Jul 2022 18:50:31 +0800 Subject: [PATCH 7/7] =?UTF-8?q?style.=20=E9=83=A8=E5=88=86typo=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E5=8F=8A=E7=BF=BB=E8=AF=91=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/Localizations/en-us.xaml | 8 +-- .../Resources/Localizations/ja-jp.xaml | 2 +- .../Resources/Localizations/zh-tw.xaml | 18 +++---- src/MeoAsstGui/ViewModels/CopilotViewModel.cs | 18 +++---- src/MeoAsstGui/ViewModels/RecruitViewModel.cs | 6 +-- .../ViewModels/SettingsViewModel.cs | 12 ++--- .../ViewModels/TaskQueueViewModel.cs | 54 +++++++++---------- .../ViewModels/VersionUpdateViewModel.cs | 12 ++--- 8 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/MeoAsstGui/Resources/Localizations/en-us.xaml b/src/MeoAsstGui/Resources/Localizations/en-us.xaml index 9703bab899..19780853b2 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(splited by space) - Blacklist(splited by space) + Whitelist(split by space) + Blacklist(split by space) Would you like a drink🍷? doctor Drone Usage @@ -257,8 +257,8 @@ Unknown exception occurred Error Initialization error! - Emulator resolution not supported, please set at leat 720P with 16:9 ratio - fails to be obtaine mulator resolution . Please restart computer or consider try other emulator + Emulator resolution not supported, please set at least 720P with 16:9 ratio + fails to be obtain emulator resolution . Please restart computer or consider try other emulator Emulator disconnected, trying to reconnect Reconnect succeeded. Continue the task Reconnect failed. The connection is down! diff --git a/src/MeoAsstGui/Resources/Localizations/ja-jp.xaml b/src/MeoAsstGui/Resources/Localizations/ja-jp.xaml index 5aa7b71939..0e4ecbebc0 100644 --- a/src/MeoAsstGui/Resources/Localizations/ja-jp.xaml +++ b/src/MeoAsstGui/Resources/Localizations/ja-jp.xaml @@ -258,7 +258,7 @@ エラー 初期化エラー! エミュレータの解像度はサポートされていません。アスペクト比16:9で、720p以上に設定してください - エミュレーターの解像度を取得できませんでした。コンピューターを再起動するか、エミュレーターを変更してから再試行することをお勧めします + エミュレータの解像度を取得できませんでした。コンピュータを再起動するか、エミュレータを変更してから再試行することをお勧めします エミュレータが切断されました。再接続しようとしています 再接続に成功した。タスクを続行します 再接続に失敗した。切断されました! diff --git a/src/MeoAsstGui/Resources/Localizations/zh-tw.xaml b/src/MeoAsstGui/Resources/Localizations/zh-tw.xaml index 64a92df639..01ef147450 100644 --- a/src/MeoAsstGui/Resources/Localizations/zh-tw.xaml +++ b/src/MeoAsstGui/Resources/Localizations/zh-tw.xaml @@ -90,7 +90,7 @@ 開機自動啟動 啟動後直接運行 - 客戶端版本 + 用戶端版本 啟動後自動開啟模擬器 等待模擬器啟動時間(秒) 模擬器路徑 @@ -100,9 +100,9 @@ 策略 開始次數限制 投資次數限制 - 源石錠達到上限停止任務 + 源石錠達到上限停止 - 企鵝物流彙報ID(僅數字部分) + 企鵝物流匯報ID(僅數字部分) 信用購物 優先購買 子串即可 空格分隔 @@ -111,8 +111,8 @@ 無人機用途 - 最小化時隱藏至託盤 - 重要資訊彈出系統通知 + 最小化時隱藏至托盤 + 重要訊息彈出系統通知 關卡選擇隱藏當日不開放關卡 主介面可選擇按鈕功能 @@ -189,7 +189,7 @@ 先/輔晶片 近/特晶片 週一了,可以打剿滅了~ - 周日了,記得打剿滅喔~ + 週日了,記得打剿滅喔~ @@ -234,7 +234,7 @@ 開始 作業分享站 - 視頻鏈接 + 影片連結 小提示: @@ -270,7 +270,7 @@ 開始戰鬥: 完成戰鬥: 任務已全部完成! - 打開客戶端失敗,請檢查配置檔 + 打開用戶端失敗,請檢查配置檔 出現錯誤 已返回 掉落識別錯誤 @@ -326,7 +326,7 @@ MAA 官網 - 源碼:GitHub + 原始碼:GitHub 自動戰鬥作業分享 Q 群 一群 二群 diff --git a/src/MeoAsstGui/ViewModels/CopilotViewModel.cs b/src/MeoAsstGui/ViewModels/CopilotViewModel.cs index f7a114a73b..41f138ebbd 100644 --- a/src/MeoAsstGui/ViewModels/CopilotViewModel.cs +++ b/src/MeoAsstGui/ViewModels/CopilotViewModel.cs @@ -66,14 +66,14 @@ namespace MeoAsstGui // LogItemViewModels.Insert(0, new LogItemViewModel(time + content, color, weight)); } - private bool _idel = true; + private bool _idle = true; public bool Idle { - get => _idel; + get => _idle; set { - _idel = value; + _idle = value; NotifyOfPropertyChange(() => Idle); } } @@ -242,13 +242,13 @@ namespace MeoAsstGui { count++; string group_name = group["name"] + ": "; - var operinfos = new List(); + var operInfos = new List(); foreach (JObject oper in group["opers"]) { - operinfos.Add(string.Format("{0} {1}", oper["name"], oper["skill"])); + operInfos.Add(string.Format("{0} {1}", oper["name"], oper["skill"])); } - AddLog(group_name + string.Join(" / ", operinfos), "black"); + AddLog(group_name + string.Join(" / ", operInfos), "black"); } } @@ -316,7 +316,7 @@ namespace MeoAsstGui set => SetAndNotify(ref _form, value); } - private bool _catched = false; + private bool _caught = false; public async void Start() { @@ -334,8 +334,8 @@ namespace MeoAsstGui { return asstProxy.AsstConnect(ref errMsg); }); - _catched = await task; - if (!_catched) + _caught = await task; + if (!_caught) { AddLog(errMsg, "DarkRed"); return; diff --git a/src/MeoAsstGui/ViewModels/RecruitViewModel.cs b/src/MeoAsstGui/ViewModels/RecruitViewModel.cs index 4cc1d810df..70cb9dfb20 100644 --- a/src/MeoAsstGui/ViewModels/RecruitViewModel.cs +++ b/src/MeoAsstGui/ViewModels/RecruitViewModel.cs @@ -126,7 +126,7 @@ namespace MeoAsstGui } } - private bool _catched = false; + private bool _caught = false; public async void StartCalc() { @@ -137,8 +137,8 @@ namespace MeoAsstGui { return asstProxy.AsstConnect(ref errMsg); }); - _catched = await task; - if (!_catched) + _caught = await task; + if (!_caught) { RecruitInfo = errMsg; return; diff --git a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs index 53605cd5ce..32b311543e 100644 --- a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs +++ b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs @@ -1205,10 +1205,10 @@ namespace MeoAsstGui public async void ManualUpdate() { - var updateModle = _container.Get(); + var updateModel = _container.Get(); var task = Task.Run(() => { - if (!updateModle.CheckAndDownloadUpdate(true)) + if (!updateModel.CheckAndDownloadUpdate(true)) { Execute.OnUIThread(() => { @@ -1237,7 +1237,7 @@ namespace MeoAsstGui { SetAndNotify(ref _connectAddress, value); ViewStatusStorage.Set("Connect.Address", value); - UpdateWindowTitle(); /* 每次修改连接地址时更新WIndowTitle */ + UpdateWindowTitle(); /* 每次修改连接地址时更新WindowTitle */ } } @@ -1405,14 +1405,14 @@ namespace MeoAsstGui public bool UseTray = true; #pragma warning restore SA1401 // Fields should be private - // private bool _usetray = Convert.ToBoolean(ViewStatusStorage.Get("GUI.UseTray", bool.TrueString)); + // private bool _useTray = Convert.ToBoolean(ViewStatusStorage.Get("GUI.UseTray", bool.TrueString)); // public bool UseTray // { - // get { return _usetray; } + // get { return _useTray; } // set // { - // SetAndNotify(ref _usetray, value); + // SetAndNotify(ref _useTray, value); // ViewStatusStorage.Set("GUI.UseTray", value.ToString()); // var trayObj = _container.Get(); // trayObj.SetVisible(value); diff --git a/src/MeoAsstGui/ViewModels/TaskQueueViewModel.cs b/src/MeoAsstGui/ViewModels/TaskQueueViewModel.cs index a0e5df9647..3d5aca9759 100644 --- a/src/MeoAsstGui/ViewModels/TaskQueueViewModel.cs +++ b/src/MeoAsstGui/ViewModels/TaskQueueViewModel.cs @@ -35,7 +35,7 @@ namespace MeoAsstGui public ObservableCollection LogItemViewModels { get; set; } - private string _actionAfterComplated = ViewStatusStorage.Get("MainFunction.ActionAfterComplated", ActionType.DoNothing.ToString()); + private string _actionAfterCompleted = ViewStatusStorage.Get("MainFunction.ActionAfterCompleted", ActionType.DoNothing.ToString()); public List> ActionAfterCompletedList { get; set; } @@ -43,7 +43,7 @@ namespace MeoAsstGui { get { - if (Enum.TryParse(_actionAfterComplated, out ActionType action)) + if (Enum.TryParse(_actionAfterCompleted, out ActionType action)) { return action; } @@ -53,14 +53,14 @@ namespace MeoAsstGui set { - SetAndNotify(ref _actionAfterComplated, value.ToString()); + SetAndNotify(ref _actionAfterCompleted, value.ToString()); string storeValue = ActionType.DoNothing.ToString(); if (value != ActionType.Shutdown && value != ActionType.Hibernate) { storeValue = value.ToString(); } - ViewStatusStorage.Set("MainFunction.ActionAfterComplated", storeValue); + ViewStatusStorage.Set("MainFunction.ActionAfterCompleted", storeValue); } } @@ -557,8 +557,8 @@ namespace MeoAsstGui { return asstProxy.AsstConnect(ref errMsg, true); }); - bool catchd = await task; - if (!catchd) + bool caught = await task; + if (!caught) { AddLog(errMsg, "darkred"); var settingsModel = _container.Get(); @@ -571,8 +571,8 @@ namespace MeoAsstGui { return asstProxy.AsstConnect(ref errMsg); }); - catchd = await task; - if (!catchd) + caught = await task; + if (!caught) { AddLog(errMsg, "darkred"); Idle = true; @@ -786,8 +786,8 @@ namespace MeoAsstGui } var asstProxy = _container.Get(); - bool setted = asstProxy.AsstSetFightTaskParams(Stage, medicine, stone, times, DropsItemId, drops_quantity); - if (setted) + bool isSet = asstProxy.AsstSetFightTaskParams(Stage, medicine, stone, times, DropsItemId, drops_quantity); + if (isSet) { AddLog(Localization.GetString("SetSuccessfully"), "Black"); } @@ -868,7 +868,7 @@ namespace MeoAsstGui settings.RoguelikeSquad, settings.RoguelikeRoles, settings.RoguelikeCoreChar); } - public bool killemulator() + public bool killEmulator() { int pid = 0; string port; @@ -882,22 +882,22 @@ namespace MeoAsstGui port = "5555"; } - string portcmd = "netstat -ano|findstr \"" + port + "\""; - Process checkcmd = new Process(); - checkcmd.StartInfo.FileName = "cmd.exe"; - checkcmd.StartInfo.UseShellExecute = false; - checkcmd.StartInfo.RedirectStandardInput = true; - checkcmd.StartInfo.RedirectStandardOutput = true; - checkcmd.StartInfo.RedirectStandardError = true; - checkcmd.StartInfo.CreateNoWindow = true; - checkcmd.Start(); - checkcmd.StandardInput.WriteLine(portcmd); - checkcmd.StandardInput.WriteLine("exit"); + string portCmd = "netstat -ano|findstr \"" + port + "\""; + Process checkCmd = new Process(); + checkCmd.StartInfo.FileName = "cmd.exe"; + checkCmd.StartInfo.UseShellExecute = false; + checkCmd.StartInfo.RedirectStandardInput = true; + checkCmd.StartInfo.RedirectStandardOutput = true; + checkCmd.StartInfo.RedirectStandardError = true; + checkCmd.StartInfo.CreateNoWindow = true; + checkCmd.Start(); + checkCmd.StandardInput.WriteLine(portCmd); + checkCmd.StandardInput.WriteLine("exit"); Regex reg = new Regex("\\s+", RegexOptions.Compiled); string line; while (true) { - line = checkcmd.StandardOutput.ReadLine(); + line = checkCmd.StandardOutput.ReadLine(); try { line = line.Trim(); @@ -969,11 +969,11 @@ namespace MeoAsstGui // Shutdown 会调用 OnExit 但 Exit 不会 Application.Current.Shutdown(); - // Enviroment.Exit(0); + // Environment.Exit(0); break; case ActionType.ExitEmulator: - if (!killemulator()) + if (!killEmulator()) { AddLog(Localization.GetString("CloseEmulatorFailed"), "DarkRed"); } @@ -981,7 +981,7 @@ namespace MeoAsstGui break; case ActionType.ExitEmulatorAndSelf: - if (!killemulator()) + if (!killEmulator()) { AddLog(Localization.GetString("CloseEmulatorFailed"), "DarkRed"); } @@ -989,7 +989,7 @@ namespace MeoAsstGui // Shutdown 会调用 OnExit 但 Exit 不会 Application.Current.Shutdown(); - // Enviroment.Exit(0); + // Environment.Exit(0); break; case ActionType.Shutdown: diff --git a/src/MeoAsstGui/ViewModels/VersionUpdateViewModel.cs b/src/MeoAsstGui/ViewModels/VersionUpdateViewModel.cs index 0c5674f69c..6c03152519 100644 --- a/src/MeoAsstGui/ViewModels/VersionUpdateViewModel.cs +++ b/src/MeoAsstGui/ViewModels/VersionUpdateViewModel.cs @@ -231,9 +231,9 @@ namespace MeoAsstGui // 程序正在运行中,部分文件是无法覆写的,这里曲线操作下 // 先将当前这些文件重命名,然后再把新的复制过来 - foreach (var oldfile in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.old")) + foreach (var oldFile in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.old")) { - File.Delete(oldfile); + File.Delete(oldFile); } foreach (var file in uncopiedList) @@ -426,11 +426,11 @@ namespace MeoAsstGui Semver.SemVersion curVersionObj; bool curParsed = Semver.SemVersion.TryParse(_curVersion, Semver.SemVersionStyles.AllowLowerV, out curVersionObj); - Semver.SemVersion lastestVersionObj; - bool lastestPared = Semver.SemVersion.TryParse(_latestVersion, Semver.SemVersionStyles.AllowLowerV, out lastestVersionObj); - if (curParsed && lastestPared) + Semver.SemVersion latestVersionObj; + bool latestPared = Semver.SemVersion.TryParse(_latestVersion, Semver.SemVersionStyles.AllowLowerV, out latestVersionObj); + if (curParsed && latestPared) { - if (curVersionObj.CompareSortOrderTo(lastestVersionObj) >= 0) + if (curVersionObj.CompareSortOrderTo(latestVersionObj) >= 0) { return false; }