From f27a537f7029fc35e165c87c5ea01e9c2e941b1e Mon Sep 17 00:00:00 2001 From: unknownsno Date: Wed, 22 Feb 2023 22:48:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dys=E6=9F=A5=E8=AF=A2=EF=BC=8C?= =?UTF-8?q?=E5=B0=98=E6=AD=8C=E5=A3=B6=E8=83=8C=E6=99=AF=E5=B0=BA=E5=AF=B8?= =?UTF-8?q?=E4=B8=8E=E5=86=85=E5=AE=B9=E4=B8=8D=E5=8C=B9=E9=85=8D=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/genshin/query_user/query_role/draw_image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/genshin/query_user/query_role/draw_image.py b/plugins/genshin/query_user/query_role/draw_image.py index f0f0c00b..fbb2eb5d 100644 --- a/plugins/genshin/query_user/query_role/draw_image.py +++ b/plugins/genshin/query_user/query_role/draw_image.py @@ -234,7 +234,10 @@ def get_home_data_image(home_data_list: List[Dict]) -> BuildImage: 画出家园数据 :param home_data_list: 家园列表 """ - h = 130 + 340 * len(home_data_list) + homes = os.listdir(image_path / "homes") + homes.remove("lock.png") + homes.sort() + h = 130 + 340 * len(homes) region = BuildImage( 550, h, color="#E3DBD1", font="HYWenHei-85W.ttf", font_size=40 ) @@ -250,9 +253,6 @@ def get_home_data_image(home_data_list: List[Dict]) -> BuildImage: region.text((0, region.h - 70), f"仙力: 0", center_type="by_width") region.circle_corner(30) height = 100 - homes = os.listdir(image_path / "homes") - homes.remove("lock.png") - homes.sort() unlock_home = [x["name"] for x in home_data_list] for i, file in enumerate(homes): home_img = image_path / "homes" / file