diff --git a/LittlePaimon/plugins/Paimon_Wiki/__init__.py b/LittlePaimon/plugins/Paimon_Wiki/__init__.py index 23a7e2b..8976487 100644 --- a/LittlePaimon/plugins/Paimon_Wiki/__init__.py +++ b/LittlePaimon/plugins/Paimon_Wiki/__init__.py @@ -269,10 +269,9 @@ async def _(event: MessageEvent, state: T_State, type: str = Arg('type'), name: await total_wiki.finish() elif len(matches) == 1 and len(list(matches.values())[0]) == 1: final_name = list(matches.values())[0][0] + temp_type = list(matches.keys())[0] if type in {'材料', '攻略', '图鉴'}: - type = list(matches.keys())[0] + type - if type.endswith(('攻略', '图鉴')) and type.startswith(('原魔', '圣遗物', '武器', '七圣召唤')): - type = f'{type[-2:]}图鉴' + type = f'{temp_type}图鉴' if temp_type != '角色' else f'{temp_type}{type}' try: await total_wiki.finish( MessageSegment.image(API[type].format(proxy=config.github_proxy, name=final_name))) diff --git a/LittlePaimon/plugins/Paimon_Wiki/draw_map.py b/LittlePaimon/plugins/Paimon_Wiki/draw_map.py index 36680f7..1bfc15c 100644 --- a/LittlePaimon/plugins/Paimon_Wiki/draw_map.py +++ b/LittlePaimon/plugins/Paimon_Wiki/draw_map.py @@ -163,6 +163,8 @@ async def get_full_map(names: List[str], map_: str): models.XYPoint(x1_temp, y1_temp), models.XYPoint(x2_temp, y2_temp), points)] + if len(group_point[0][2]) > 400: + group_point = img.k_means_points(points, 600) lt_point = group_point[0][0] rb_point = group_point[0][1] min_point = XYPoint(x=min(min_point.x, lt_point.x), y=min(min_point.y, lt_point.y))