mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
chore: 连战新增 -1 表示禁用切换
This commit is contained in:
@@ -75,12 +75,16 @@ bool asst::FightTask::set_params(const json::value& params)
|
||||
const int times = params.get("times", INT_MAX);
|
||||
int series = params.get("series", 1);
|
||||
|
||||
// 重置插件状态 1000 表示自动连战,-1 表示禁用连战切换
|
||||
m_fight_times_task_plugin_prt->set_enable(series != -1);
|
||||
m_fight_series_adjust_plugin_ptr->set_close_stone_page_next(false);
|
||||
m_fight_series_adjust_plugin_ptr->set_enable(false);
|
||||
m_fight_series_adjust_plugin_ptr->set_enable(series == 1000);
|
||||
if (series == 1000) {
|
||||
m_fight_series_adjust_plugin_ptr->set_enable(true);
|
||||
series = 6;
|
||||
}
|
||||
else if (series == -1) {
|
||||
series = 1;
|
||||
}
|
||||
else if (series < 1 || series > 6) {
|
||||
Log.error("Invalid series");
|
||||
return false;
|
||||
|
||||
@@ -112,6 +112,7 @@ public class FightSettingsUserControlModel : TaskViewModel
|
||||
{ "3", 6 },
|
||||
{ "2", 2 },
|
||||
{ "1", 1 },
|
||||
{ LocalizationHelper.GetString("NotSelected"), -1 },
|
||||
};
|
||||
|
||||
public string?[] Stages => [Stage1, Stage2, Stage3];
|
||||
|
||||
Reference in New Issue
Block a user