Skip to content

Commit

Permalink
refactor:重构公招代码
Browse files Browse the repository at this point in the history
  • Loading branch information
EightyDollars committed Oct 23, 2023
1 parent 314e793 commit 22f43f4
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 255 deletions.
34 changes: 12 additions & 22 deletions arknights_mower/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,16 @@
按tag分类组合干员
'''

recruit_agent_list = {}
rarity_tags = []

for key in recruit_tag:
recruit_agent_list[key] = {
"min_level": 7,
"agent": []
}
for opeartors in recruit_agent:
if key in recruit_agent[opeartors]['tags']:
if recruit_agent[opeartors]['stars'] < recruit_agent_list[key]["min_level"]:
recruit_agent_list[key]["min_level"] = recruit_agent[opeartors]['stars']

recruit_agent_list[key]["agent"].append(
agent_with_tags = {}
for item in recruit_tag:
agent_with_tags[item] = []
for agent in recruit_agent:
if {item} < set(recruit_agent[agent]['tags']):
agent_with_tags[item].append(
{
"name": recruit_agent[opeartors]['name'],
"level": recruit_agent[opeartors]['stars'],
})
# 保底5星的tag
rarity_tags = []
for key in recruit_agent_list:
if recruit_agent_list[key]['min_level'] >= 5:
rarity_tags.append(key)
'id': agent,
'name': recruit_agent[agent]['name'],
'star': recruit_agent[agent]['stars']
}
)

Binary file modified arknights_mower/resources/recruit_no_lmb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 22f43f4

Please sign in to comment.