mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-31 04:30:29 +08:00
修复:当前信息补空格 & 给谁用
This commit is contained in:
parent
a0874f0077
commit
2a864fb118
@ -1623,7 +1623,7 @@ async def draw_info_pic(uid: str, image: Optional[Match] = None) -> str:
|
||||
daily_data['resin_recovery_time'])))
|
||||
text_draw.text((268, 305), f' {next_resin_rec_time}', text_color, genshin_font(18), anchor='lm')
|
||||
|
||||
text_draw.text((170, 331), f'预计 后全部恢复', text_color, genshin_font(18), anchor='lm')
|
||||
text_draw.text((170, 331), f'预计 后全部恢复', text_color, genshin_font(18), anchor='lm')
|
||||
text_draw.text((208, 331), f'{resin_recovery_time}', highlight_color, genshin_font(18), anchor='lm')
|
||||
|
||||
# 洞天宝钱时间计算
|
||||
|
@ -160,24 +160,26 @@ char_adv_im = """【{}】
|
||||
|
||||
|
||||
async def weapon_adv(name):
|
||||
char_adv_path = os.path.join(FILE_PATH, 'Genshin All Char.xlsx')
|
||||
# char_adv_path = FILE_PATH
|
||||
char_adv_path = os.path.join(FILE_PATH, 'mihoyo_libs/Genshin All Char.xlsx')
|
||||
wb = load_workbook(char_adv_path)
|
||||
ws = wb.active
|
||||
|
||||
weapon_name = ''
|
||||
char_list = []
|
||||
weapons={}
|
||||
for c in range(2, 5):
|
||||
for r in range(2, 300):
|
||||
if ws.cell(r, c).value:
|
||||
# if all(i in ws.cell(r,c).value for i in name):
|
||||
if name in ws.cell(r, c).value:
|
||||
weapon_name = ws.cell(r, c).value
|
||||
char_list.append(ws.cell(2 + ((r - 2) // 5) * 5, 1).value)
|
||||
weapon=weapons.get(weapon_name,[])
|
||||
weapon.append(ws.cell(2 + ((r - 2) // 5) * 5, 1).value)
|
||||
weapons[weapon_name]=weapon
|
||||
|
||||
if char_list:
|
||||
im = ','.join(char_list)
|
||||
im = im + '可能会用到【{}】'.format(weapon_name)
|
||||
if weapons:
|
||||
im = []
|
||||
for k, v in weapons.items():
|
||||
im.append(f'{"、".join(v)}可能会用到【{k}】')
|
||||
im = '\n'.join(im)
|
||||
else:
|
||||
im = '没有角色能使用【{}】'.format(weapon_name)
|
||||
return im
|
||||
|
Loading…
x
Reference in New Issue
Block a user