优化材料图鉴文案

This commit is contained in:
CMHopeSunshine 2022-09-18 18:47:15 +08:00
parent aacebaca4c
commit 0342e220f6
2 changed files with 3 additions and 3 deletions
LittlePaimon/plugins/Paimon_Wiki

@ -13,7 +13,7 @@ from LittlePaimon.utils.alias import get_match_alias
from LittlePaimon.utils.message import MessageBuild
from LittlePaimon.database.models import PlayerAlias
from LittlePaimon.config import RESOURCE_BASE_PATH
from .handler import init_map, draw_map
from .draw_map import init_map, draw_map
# from .abyss_rate_draw import draw_rate_rank, draw_teams_rate

@ -95,14 +95,14 @@ async def draw_map(name: str, map_: str):
await total_img.paste(map_img, (48, total_img.height - 60 - map_img.height))
icon = await aiorequests.get_img(resource.icon, size=(300, 300))
await total_img.paste(icon, (100, 100))
await total_img.text(f'{name}', 457, 147, fm.get('SourceHanSerifCN-Bold.otf', 72), 'white')
await total_img.text(f'{name}', 454, 145, fm.get('SourceHanSerifCN-Bold.otf', 72), 'white')
info = await aiorequests.get(f'https://info.minigg.cn/materials?query={name}')
info = info.json()
des = ''
if 'description' in info:
des += info['description'].strip('\n')
if 'source' in info:
des += '\n推荐采集地点:' + ''.join(info['source'])
des += '\n推荐采集地点:' + ''.join(info['source']).replace('推荐:', '')
if des:
await total_img.text_box(des.replace('\n', '^'), (482, 1010), (281, 520), fm.get('SourceHanSansCN-Bold.otf', 30), '#3c3c3c')
await total_img.text('CREATED BY LITTLEPAIMON', (0, total_img.width), total_img.height - 45, fm.get('bahnschrift_bold', 36, 'Bold'), '#3c3c3c', align='center')