mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
perf: 肉鸽选难度允许不选难度 (#10979)
* perf: 肉鸽选难度允许不选难度 * fix: 在插件中对 gui 传入的 -1 值做特殊处理
This commit is contained in:
@@ -47,7 +47,16 @@ bool asst::RoguelikeDifficultySelectionTaskPlugin::_run()
|
||||
{
|
||||
LogTraceFunction;
|
||||
|
||||
const int difficulty = m_config->get_run_for_collectible() ? 0 : m_config->get_difficulty();
|
||||
int difficulty = m_config->get_difficulty();
|
||||
if (difficulty == -1) {
|
||||
Log.info(__FUNCTION__, "| use current difficulty, skip select_difficulty");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_config->get_run_for_collectible()) {
|
||||
difficulty = 0;
|
||||
}
|
||||
|
||||
Log.info(__FUNCTION__, "| current_difficulty:", m_current_difficulty, "next difficulty:", difficulty);
|
||||
|
||||
// 仅在插件记录的当前难度与目标难度不一致时重新选择难度
|
||||
|
||||
@@ -1962,6 +1962,8 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
var value = i.ToString();
|
||||
RoguelikeDifficultyList.Add(new CombinedData { Display = value, Value = value });
|
||||
}
|
||||
|
||||
RoguelikeDifficultyList.Add(new CombinedData { Display = "Current", Value = (-1).ToString() });
|
||||
}
|
||||
|
||||
private void UpdateRoguelikeModeList()
|
||||
|
||||
Reference in New Issue
Block a user