gold_readbag and russian

This commit is contained in:
hibiki
2021-06-15 10:57:08 +08:00
parent 95209093de
commit ea620fdae9
125 changed files with 2106 additions and 1244 deletions
@@ -12,6 +12,15 @@ try:
except ModuleNotFoundError:
import json
__plugin_name__ = '原神资源查询'
__plugin_usage__ = '用法:\n' \
'\t原神资源查询 [消息]\n' \
'\t原神资源列表\n' \
'\t[消息]在哪\n' \
'\t哪有[消息]\n' \
'[消息] = 资源名称'
qr = on_command("原神资源查询", priority=5, block=True)
qr_lst = on_command("原神资源列表", priority=5, block=True)
rex_qr = on_regex('.*?(在哪|在哪里|哪有|哪里有).*?', rule=to_me(), priority=5, block=True)
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@@ -1 +0,0 @@
@@ -7,6 +7,10 @@ import time
import base64
from configs.path_config import IMAGE_PATH
from util.init_result import image
import asyncio
import nonebot
driver: nonebot.Driver = nonebot.get_driver()
LABEL_URL = 'https://api-static.mihoyo.com/common/blackboard/ys_obc/v1/map/label/tree?app_sn=ys_obc'
POINT_LIST_URL = 'https://api-static.mihoyo.com/common/blackboard/ys_obc/v1/map/point/list?map_id=2&app_sn=ys_obc'
@@ -16,9 +20,9 @@ header = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, l
FILE_PATH = os.path.dirname(__file__)
MAP_PATH = os.path.join(IMAGE_PATH, "genshin", "seek_god_eye", "icon", "map_icon.jpg")
MAP_IMAGE = Image.open(MAP_PATH)
MAP_SIZE = MAP_IMAGE.size
MAP_PATH = None
MAP_IMAGE = None
MAP_SIZE = None
# resource_point里记录的坐标是相对坐标,是以蒙德城的大雕像为中心的,所以图片合成时需要转换坐标
CENTER = (3505, 1907)
@@ -26,6 +30,16 @@ CENTER = (3505, 1907)
zoom = 0.75
resource_icon_offset = (-int(150 * 0.5 * zoom), -int(150 * zoom))
@driver.on_startup
async def init():
global MAP_SIZE, MAP_PATH, MAP_IMAGE
MAP_PATH = os.path.join(IMAGE_PATH, "genshin", "seek_god_eye", "icon", "map_icon.jpg")
MAP_IMAGE = await asyncio.get_event_loop().run_in_executor(None, Image.open, MAP_PATH)
MAP_SIZE = MAP_IMAGE.size
await asyncio.get_event_loop().run_in_executor(None, up_label_and_point_list)
data = {
"all_resource_type": {
# 这个字典保存所有资源类型,
@@ -142,7 +156,6 @@ def up_label_and_point_list():
# 初始化
# load_resource_type_id()
up_label_and_point_list()
class Resource_map(object):