Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2023-06-22 00:45:19 +08:00 committed by GitHub
parent 855ea2e7ab
commit 13ef8214cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -225,7 +225,7 @@ async def _(msg: Bot.MessageSession, process: str, goal: str, username: str = No
output, songs = await get_level_process(msg, payload, process, goal)
if songs <= 10:
if songs <= 10 or songs >= 50:
await msg.finish(output.strip())
else:
img = await msgchain2image([Plain(output)])

View file

@ -194,9 +194,15 @@ async def get_level_process(message, payload, process, goal):
msg += f"{message.locale.t('maimai.message.process.level.last', process=process, goal=goal)}\n"
for i, s in enumerate(sorted(songs, key=lambda i: i[3])):
self_record = ''
if [int(s[0]), s[-1]] in song_record:
record_index = song_record.index([int(s[0]), s[-1]])
if goal in score_to_rank.values():
self_record = str(verlist[record_index]['achievements']) + '%'
elif goal in combo_conversion.values():
if verlist[record_index]['fc']:
self_record = list(combo_conversion.values())[list(combo_conversion.keys()).index(verlist[record_index]['fc'])]
elif goal in sync_conversion.values():
if verlist[record_index]['fs']:
self_record = list(sync_conversion.values())[list(sync_conversion.keys()).index(verlist[record_index]['fs'])]
msg += f"{s[0]}\u200B.{s[1]}{' (DX)' if s[5] == 'DX' else ''} {s[2]} {s[3]} {self_record}\n"
else:
msg = f"{message.locale.t('maimai.message.process.level', song_remain=len(song_remain), process=process, goal=goal)}"