diff --git a/Honkai_Star_Rail.py b/Honkai_Star_Rail.py index d8e8c003..64278705 100644 --- a/Honkai_Star_Rail.py +++ b/Honkai_Star_Rail.py @@ -138,7 +138,8 @@ def select_map(main_map): if not options_map: return None, _("你没下载地图,拿什么选?") keys = list(options_map.keys()) - values = list(options_map.values())+[_("返回上一级")] + values = [_(split_name[0]) + '-' + split_name[1] for split_name in (map_name.split('-') for map_name in options_map.values())] + values.append(_("返回上一级")) option_ = questionary.select(title_, values).ask() if option_ == _("返回上一级"): return select_word() @@ -172,7 +173,9 @@ def select_map(main_map): def set_config(self, start = True): global game_title if not sra_config_obj.start or not start: - title = "请选择你游戏的运行语言:" + import utils.config + _ = utils.config._ + title = _("请选择你游戏的运行语言:") options = { "简体中文": "zh_CN", "繁體中文": "zh_TC", @@ -180,9 +183,7 @@ def set_config(self, start = True): } option = questionary.select(title, options).ask() sra_config_obj.language = options[option] - import utils.config importlib.reload(utils.config) - _ = utils.config._ title = _("请选择代理地址:(不使用代理选空白选项)") options = ['https://ghproxy.com/', 'https://ghproxy.net/', 'hub.fgit.ml', ''] url_ms = [] @@ -261,7 +262,7 @@ def is_updata(self): if not asyncio.run(update_file().is_latest(type=up_data['type'], version=up_data['version'], is_log=False))[0]: need_updata.append(name) return need_updata - + def main(self, option:str=_('大世界'),start: str=None,role_list: str=None): """ 参数: diff --git a/locale/EN/LC_MESSAGES/sra.mo b/locale/EN/LC_MESSAGES/sra.mo index cf0612f9..51a79fc0 100644 Binary files a/locale/EN/LC_MESSAGES/sra.mo and b/locale/EN/LC_MESSAGES/sra.mo differ diff --git a/utils/map.py b/utils/map.py index 05e8f736..5bc83db4 100644 --- a/utils/map.py +++ b/utils/map.py @@ -11,7 +11,7 @@ class Map: def __init__(self,title = _("崩坏:星穹铁道")): """ - 参数: + 参数: :param platform: 运行设备 """ if sra_config_obj.language != "EN": @@ -42,7 +42,7 @@ def on_press(key): with keyboard.Listener(on_press=on_press) as listener: # 创建按键监听线程 listener.join() # 等待按键监听线程结束 - + def map_init(self): # 进行地图初始化,把地图缩小,需要缩小5次 target = cv.imread(f'./picture/pc/contraction.jpg') @@ -125,7 +125,7 @@ def start_map(self:Map, start, check:bool=False): wrong_map = True if f'map_{start}.json' in self.map_list: if not check: - map_list = self.map_list[self.map_list.index(f'map_{start}.json'):len(self.map_list)] + map_list = self.map_list[self.map_list.index(f'map_{start}.json'):len(self.map_list)] else: log.info("开始捡漏") map_list = sra_config_obj.fight_data.get("data", []) @@ -137,6 +137,8 @@ def start_map(self:Map, start, check:bool=False): planet_number=map.split("-")[0] map_data = read_json_file(f"map/{map}.json") name:str = map_data['name'] + split_name = name.split('-') + name = _(split_name[0]) + '-' + split_name[1] author = map_data['author'] start_dict = map_data['start'] webhook_and_log(_("开始\033[0;34;40m{name}\033[0m锄地").format(name=name))