mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2025-04-12 23:29:37 +08:00
✨ 优化材料图鉴
文案
This commit is contained in:
parent
aacebaca4c
commit
0342e220f6
@ -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')
|
Loading…
x
Reference in New Issue
Block a user