mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
feat.简单优化了一下抄作业的 UI
This commit is contained in:
@@ -65,6 +65,13 @@ bool asst::BattleProcessTask::get_stage_info()
|
||||
|
||||
bool asst::BattleProcessTask::analyze_opers_preview()
|
||||
{
|
||||
{
|
||||
json::value info = basic_info_with_what("BattleAction");
|
||||
auto& details = info["details"];
|
||||
details["description"] = "识别干员";
|
||||
callback(AsstMsg::SubTaskExtraInfo, info);
|
||||
}
|
||||
|
||||
BattleImageAnalyzer oper_analyzer;
|
||||
oper_analyzer.set_target(BattleImageAnalyzer::Target::Oper);
|
||||
|
||||
@@ -243,6 +250,26 @@ bool asst::BattleProcessTask::update_opers_info(const cv::Mat& image)
|
||||
|
||||
bool asst::BattleProcessTask::do_action(const BattleAction& action)
|
||||
{
|
||||
json::value info = basic_info_with_what("BattleAction");
|
||||
auto& details = info["details"];
|
||||
std::string desc;
|
||||
switch (action.type) {
|
||||
case BattleActionType::Deploy:
|
||||
desc = action.group_name + " 部署";
|
||||
break;
|
||||
case BattleActionType::Retreat:
|
||||
desc = action.group_name + " 撤退";
|
||||
break;
|
||||
case BattleActionType::UseSkill:
|
||||
desc = action.group_name + " 技能";
|
||||
break;
|
||||
case BattleActionType::SwitchSpeed:
|
||||
desc = "切换二倍速";
|
||||
break;
|
||||
}
|
||||
details["description"] = desc;
|
||||
callback(AsstMsg::SubTaskExtraInfo, info);
|
||||
|
||||
if (!wait_condition(action)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user