feat: 傀影肉鸽添加难度选择 (#12897)

* feat: 傀影肉鸽添加难度选择

* feat: 肉鸽难度选择不再显示不支持的选项
This commit is contained in:
Sherkey Asher
2025-06-17 09:28:34 +08:00
committed by GitHub
parent 219ec7278a
commit 3289bbabb8
6 changed files with 77 additions and 45 deletions

View File

@@ -20,13 +20,9 @@ bool asst::RoguelikeConfig::verify_and_load_params(const json::value& params)
m_theme = theme;
m_mode = mode;
if (m_theme != RoguelikeTheme::Phantom) {
m_difficulty = params.get("difficulty", 0);
}
else if (params.contains("difficulty")) {
Log.error(__FUNCTION__, "| Invalid difficulty for theme", m_theme);
return false;
}
m_difficulty = params.get("difficulty", -1);
Log.info("Roguelike theme", m_theme, "| mode", static_cast<int>(m_mode), "| difficulty", m_difficulty);
if (mode == RoguelikeMode::Collectible) {
m_collectible_mode_shopping = params.get("collectible_mode_shopping", false);

View File

@@ -8,11 +8,6 @@
bool asst::RoguelikeDifficultySelectionTaskPlugin::load_params([[maybe_unused]] const json::value& params)
{
// 集成战略 <傀影与猩红孤钻> 的难度选项没有数字标注,暂不支持难度选择功能
if (m_config->get_theme() == RoguelikeTheme::Phantom) {
return false;
}
// 深入调查和月度小队模式不需要选择难度
if (m_config->get_mode() == RoguelikeMode::Exploration || m_config->get_mode() == RoguelikeMode::Squad) {
return false;