Skip to content

Commit

Permalink
Merge pull request #737 from Starry-Wind/relic
Browse files Browse the repository at this point in the history
Relic
  • Loading branch information
Night-stars-1 authored Oct 12, 2023
2 parents df46660 + 93258cb commit 7e2f416
Show file tree
Hide file tree
Showing 10 changed files with 890 additions and 64 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ map_list.json
LICENSE
picture_list.json
version.json
*relics*.json
screencast.png
screencast1.png
utils/A_.py
Expand Down
18 changes: 15 additions & 3 deletions Honkai_Star_Rail.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from utils.calculated import calculated
from utils.exceptions import Exception
from utils.map import Map as map_word
from utils.relic import Relic
from utils.requests import *

game_title = _("崩坏:星穹铁道")
Expand All @@ -43,8 +44,10 @@ def __init__(self) -> None:
self.option_dict = {
_('大世界'): "",
_('派遣委托'): "",
_('遗器模块'): "",
_('更新资源'): "",
_('编辑配置'): ""
_('编辑配置'): "",
_('退出脚本'): ""
}
self.updata_dict = {
_("脚本"):{
Expand Down Expand Up @@ -279,11 +282,13 @@ def is_updata(self):
need_updata.append(name)
return need_updata

def main(self, option:str=_('大世界'),start: str=None,role_list: str=None):
def main(self, option:str=_('大世界'),start: str=None,role_list: str=None) -> bool:
"""
参数:
:param start: 起始地图编号
:param role_list: 提示
返回:
:return ret: 是否回到主菜单
"""
if option in self.option_list:
(start, role_list) = self.choose_map(option) if not start else (start, role_list)
Expand All @@ -305,6 +310,10 @@ def main(self, option:str=_('大世界'),start: str=None,role_list: str=None):
elif option == _("派遣委托"):
commission = Commission(4, game_title)
commission.start() # 读取配置
elif option == _("遗器模块"):
relic = Relic(game_title)
relic.relic_entrance()
return True
else:
raise Exception(role_list)
else:
Expand All @@ -317,6 +326,7 @@ def main(self, option:str=_('大世界'),start: str=None,role_list: str=None):
log.info(_("开始运行,请勿移动鼠标和键盘"))
log.info(_("若脚本运行无反应,请使用管理员权限运行"))
self.option_dict[option]()
return False

if __name__ == "__main__":
join_time = read_json_file(CONFIG_FILE_NAME).get("join_time", {})
Expand Down Expand Up @@ -348,7 +358,9 @@ def select():
...
else:
if option:
sra.main(option)
is_loop = sra.main(option)
if is_loop:
select()
else:
if questionary.select(_("请问要退出脚本吗?"), [_("退出"), _("返回主菜单")]).ask() == _("返回主菜单"):
select()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<h1 align="center">

StarRailAssistan
StarRailAssistant

⚠️本项目不会在`咸鱼``淘宝``拼多多`等平台售卖,发现售卖请帮忙举报。⚠️

Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ flet
cryptography
pluggy
httpcore
pydantic
pprint
jsonschema
83 changes: 73 additions & 10 deletions star_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
},
{
"path": "Honkai_Star_Rail.py",
"hash": "b52ce56c7618c1b5afd89f17c753d41d"
"hash": "8a01b10f082a4c87d5bec6963e6bfe95"
},
{
"path": "requirements.txt",
"hash": "8ddf218f9469f91f0cb38ef37f281cd1"
"hash": "c639eae5881af89c0139e5b91b1c65f5"
},
{
"path": "get_width.py",
"hash": "883cd3ffb3c1f7a0e8fff08ba61269b3"
"hash": "f638b665c2c0f9cdd841c8bd35ad0852"
},
{
"path": "README.md",
"hash": "1660ab49252e3b10e9305dcf1d974401"
"hash": "4262585cc05d08908b3df000c57a4f5d"
},
{
"path": "map_res_list.py",
Expand All @@ -29,7 +29,7 @@
},
{
"path": "gui.py",
"hash": "12f482d0d0cc8b100fb7f465e65c9169"
"hash": "aae914d57203b3b571281e78f06b55aa"
},
{
"path": "whl/Polygon3-3.0.9-cp311-cp311-win_amd64.whl",
Expand All @@ -54,23 +54,86 @@
{
"path": "model/cnocr/label_cn.txt",
"hash": "e3f7c9400f4379e05cadbbc8a43dda45"
}
},
{
"path": "model/cnocr/2.2/densenet_lite_134-fc/cnocr-v2.2-densenet_lite_134-fc-epoch=034-complete_match_epoch=0.8376-model.onnx",
"hash": "332265c72378b39e83ced6b4e42954c4"
},
{
"path": "model/cnocr/2.2/ppocr/en_PP-OCRv3_rec_infer.onnx",
"hash": "003da6ca16cae88c5270882fc5e7417b"
},
{
"path": "model/cnocr/2.2/ppocr/en_number_mobile_v2.0_rec_infer.onnx",
"hash": "442ea7b4dabdbaec95af17a6d17c3503"
},
{
"path": "model/cnocr/2.2/densenet_lite_114-fc/cnocr-v2.2-densenet_lite_114-fc-epoch=037-val-complete_match-epoch=0.9667-model.onnx",
"hash": "079f9e53539b1e636df518dfc8343f38"
},
{
"path": "model/cnstd/1.2/ppocr/en_PP-OCRv3_det_infer.onnx",
"hash": "72708a3ac241e25fefbc606832dc7529"
},
{
"path": "model/cnstd/1.2/ppocr/ch_PP-OCRv3_det_infer.onnx",
"hash": "5732f8c84bd4cc0dab35094e7260f080"
},
{
"path": "utils/calculated.py",
"hash": "f169a54b20b40a18cb8ca806a6ea3fa7"
},
{
"path": "utils/update_file.py",
"hash": "eb1ca189b78b35d1a2a09eeb1e39cfed"
},
{
"path": "utils/exceptions.py",
"hash": "368045dd7ff5b9c346d75d9b3dd6057b"
},
{
"path": "utils/record_v7.2.py",
"hash": "03047d50df214d029132f5f9a7372aae"
},
{
"path": "utils/cv_tools.py",
"hash": "8cee1592daf7b4ff153b8ef9c97a39f8"
},
{
"path": "utils/map.py",
"hash": "dfeba1fee224dbde5e266ddcdb5b144c"
},
{
"path": "utils/old_cv_tools.py",
"hash": "d58c447d88f7924704ddbc593985bf0b"
},
{
"path": "utils/adb.py",
"hash": "82993dbc84090d081cff62d95d2d5d7a"
},
{
"path": "utils/log.py",
"hash": "172d7d4d63c1b3136c5600055e666967"
},
{
"path": "utils/requests.py",
"hash": "f004e90febde2faeb7577e928df8380d"
},
{
"path": "utils/simulated_universe.py",
"hash": "ee14b83bd91b720095188ccc475c014d"
"hash": "a034ae2b2de94b16d3ac6ed1dfe3a807"
},
{
"path": "utils/config.py",
"hash": "ad44ededa78b1830f6ad63dd8e28af27"
"hash": "cc84336e148d5d7558ef2bde0edee672"
},
{
"path": "utils/get_angle.py",
"hash": "d87199a94a0f12290e75b68936e68326"
"hash": "1f56df0ccc972ab1955078fdc372870f"
},
{
"path": "utils/commission.py",
"hash": "f2911ffe8697a5cfc6301ba66e383116"
"hash": "173d380cdc984361308350517864d38f"
},
{
"path": "utils/route_helper.py",
Expand Down
Loading

0 comments on commit 7e2f416

Please sign in to comment.