feat: 新增公招 3 星 Tag 的倾向策略 (#8868)

* feat: 新增3星Tag的倾向策略

* docs: add docs for `first_tags`

* i18n: remove unexpected dots

* fix: 在 `NoExtra` 模式下返回默认 `final_combination`
This commit is contained in:
70CentsApple
2024-05-03 17:16:50 +08:00
committed by GitHub
parent 64a5032198
commit 9fb75f7d61
18 changed files with 119 additions and 15 deletions

View File

@@ -52,6 +52,7 @@ bool asst::RecruitTask::set_params(const json::value& params)
bool expedite = params.get("expedite", false);
[[maybe_unused]] int expedite_times = params.get("expedite_times", 0);
bool skip_robot = params.get("skip_robot", true);
std::vector<std::string> first_tags = params.get("first_tags", std::vector<std::string>(0));
std::unordered_map<int /*level*/, int /*minute*/> recruitment_time_map;
recruitment_time_map[3] = std::clamp(params.get("recruitment_time", "3", 9 * 60), 1 * 60, 9 * 60);
@@ -71,6 +72,7 @@ bool asst::RecruitTask::set_params(const json::value& params)
.set_need_refresh(refresh)
.set_use_expedited(expedite)
.set_select_extra_tags(extra_tags_mode)
.set_first_tags(first_tags)
.set_select_level(std::move(select))
.set_confirm_level(std::move(confirm))
.set_skip_robot(skip_robot)