From e6f208d4fbe6b137ed1b3da49c804905e59a8b5b Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Thu, 3 Nov 2022 15:31:15 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20`ys`=E5=9B=BE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=96=B0=E5=B0=98=E6=AD=8C=E5=A3=B6=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=98=B5=E7=A7=B0=E8=BF=87=E9=95=BF=E4=BC=9A=E5=92=8CUID?= =?UTF-8?q?=E9=87=8D=E5=8F=A0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/plugins/Paimon_Gacha_Log/draw.py | 2 +- LittlePaimon/plugins/Paimon_Info/draw_player_card.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/LittlePaimon/plugins/Paimon_Gacha_Log/draw.py b/LittlePaimon/plugins/Paimon_Gacha_Log/draw.py index 5acdd51..b8f6116 100644 --- a/LittlePaimon/plugins/Paimon_Gacha_Log/draw.py +++ b/LittlePaimon/plugins/Paimon_Gacha_Log/draw.py @@ -171,7 +171,7 @@ async def draw_gacha_log(user_id: str, uid: str, nickname: Optional[str], signat # 签名和uid if signature: await img.text(signature, 165, 116, fm.get('hywh', 32), '#252525') - nickname_length = img.text_length(nickname, fm.get('hywh', 40)) + nickname_length = img.text_length(nickname, fm.get('hywh', 48)) await img.text(f'UID{uid}', 166 + nickname_length + 36, 58, fm.get('bahnschrift_regular', 48, 'Regular'), '#252525') diff --git a/LittlePaimon/plugins/Paimon_Info/draw_player_card.py b/LittlePaimon/plugins/Paimon_Info/draw_player_card.py index d0c49c5..da1c17c 100644 --- a/LittlePaimon/plugins/Paimon_Info/draw_player_card.py +++ b/LittlePaimon/plugins/Paimon_Info/draw_player_card.py @@ -151,7 +151,7 @@ async def draw_player_card(player: Player, info: PlayerInfo, characters: List[Ch # 签名和uid if info.signature: await img.text(info.signature, 223, 150, fm.get('hywh', 48), '#ddcdba') - nickname_length = img.text_length(info.nickname[:25], fm.get('hywh', 64)) + nickname_length = img.text_length(info.nickname, fm.get('hywh', 64)) await img.text(f'UID{player.uid}', 223 + nickname_length + 29, 90, fm.get('hywh', 48), '#ddcdba') else: await img.text(f'UID{player.uid}', 223, 150, fm.get('hywh', 48), '#ddcdba') @@ -170,13 +170,12 @@ async def draw_player_card(player: Player, info: PlayerInfo, characters: List[Ch await asyncio.gather(*[ img.text(str(home_data[i]), (155 + 225 * (i % 4), 252 + 225 * (i % 4)), 961, fm.get('hywh', 48), 'black', 'center') for i in range(len(home_data))]) - home_name = {'罗浮洞': 168, '翠黛峰': 392, '清琼岛': 617, '绘绮庭': 841} + home_name = {'罗浮洞': 168, '翠黛峰': 336, '清琼岛': 505, '绘绮庭': 673, '妙香林': 841} await asyncio.gather(*[ img.text(name if name in info.home.unlock else '未解锁', home_name[name], 923, fm.get('hywh', 24), (0, 0, 0, 153), 'center') for name in home_name]) # 世界探索 - # await asyncio.gather(*[draw_world_card(img, w) for w in info.world_explore.list()]) for w in info.world_explore.list(): await draw_world_card(img, w)