From b0f246ee09bbaeab2f8792777ffde2a2b0259922 Mon Sep 17 00:00:00 2001 From: RBAmeto <46624927+RBAmeto@users.noreply.github.com> Date: Wed, 24 May 2023 21:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=BD=E5=8D=A1=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=BB=98=E5=9B=BE=E9=97=AE=E9=A2=98=20(#49)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复抽卡记录绘图问题 * 🚨 `pre-commit-ci`修复格式错误 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- StarRailUID/starrailuid_gachalog/draw_gachalogs.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/StarRailUID/starrailuid_gachalog/draw_gachalogs.py b/StarRailUID/starrailuid_gachalog/draw_gachalogs.py index 8f26428..90ec66b 100644 --- a/StarRailUID/starrailuid_gachalog/draw_gachalogs.py +++ b/StarRailUID/starrailuid_gachalog/draw_gachalogs.py @@ -62,6 +62,7 @@ NORMAL_LIST = [ '制胜的瞬间', '无可取代的东西', '时节不居', + '如泥酣眠', ] UP_LIST = { @@ -309,7 +310,7 @@ async def draw_gachalogs_img(uid: str, user_id: str) -> Union[bytes, str]: total_data[i]['type'] = '仓鼠型' # 常量偏移数据 - single_y = 150 + single_y = 170 # 计算图片尺寸 normal_y = (1 + ((total_data['群星跃迁']['total'] - 1) // 5)) * single_y @@ -406,7 +407,8 @@ async def draw_gachalogs_img(uid: str, user_id: str) -> Union[bytes, str]: 'mm', ) y_extend += ( - (1 + ((total_data[type_list[index - 1]]['total'] - 1) // 5)) * 150 + (1 + ((total_data[type_list[index - 1]]['total'] - 1) // 5)) + * single_y if index != 0 else 0 ) @@ -415,7 +417,7 @@ async def draw_gachalogs_img(uid: str, user_id: str) -> Union[bytes, str]: tasks = [] for item_index, item in enumerate(total_data[i]['list']): item_x = (item_index % 5) * 138 + 25 - item_y = (item_index // 5) * 170 + y + 355 + item_y = (item_index // 5) * single_y + y + 355 xy_point = (item_x, item_y) tasks.append( _draw_card(