Skip to content

Commit

Permalink
g'x
Browse files Browse the repository at this point in the history
  • Loading branch information
Night-stars-1 committed May 13, 2023
1 parent 445dfa6 commit 060b2c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
13 changes: 1 addition & 12 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
{
"real_width": 1295,
"auto_battle_persistence": 0,
"real_height": 757,
"map_debug": false,
"github_proxy": "",
"webhook_url": "",
"map_version": "0",
"start": false,
"temp_version": "0",
"star_version": "0"
}
{"real_width":1295,"auto_battle_persistence":0,"real_height":757,"map_debug":false,"github_proxy":"","webhook_url":"","map_version":"20230513163713","start":true,"temp_version":"20230513163713","star_version":"20230514012550"}
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
MouseInfo
numpy
opencv-python
PyAutoGUI
PyGetWindow
PyMsgBox
pyperclip
PyRect
PyScreeze
Expand Down
6 changes: 4 additions & 2 deletions tools/update_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def unzip(zip, zip_path: Path):
with ZipFile(zip, 'r') as zf:
for member in tq(zf.infolist(), desc='解压中'):
if member.filename.startswith(zip_path):
zf.extract(member+"1", tmp_dir)
zf.extract(member, tmp_dir)
log.debug(f'[资源文件更新]正在提取{member.filename}')

async def remove_file(folder_path: Path,keep_folder: Optional[List[str]] = [],keep_file: Optional[List[str]] = []) -> None:
Expand Down Expand Up @@ -109,9 +109,11 @@ async def update_file(url_proxy: str="",
tmp_zip = Path() / tmp_dir / f'{type}.zip'
if not os.path.exists(tmp_dir):
os.makedirs(tmp_dir)
if not os.path.exists(unzip_path) or rm_all:
if not os.path.exists(unzip_path):
os.makedirs(unzip_path)
modify_json_file(CONFIG_FILE_NAME, f"{type}_version", "0")
elif rm_all:
modify_json_file(CONFIG_FILE_NAME, f"{type}_version", "0")

log.info(f'[资源文件更新]正在检查远程版本是否有更新...')

Expand Down

0 comments on commit 060b2c8

Please sign in to comment.