Skip to content

Commit

Permalink
Merge pull request #155 from sanmusen214/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sanmusen214 authored Jan 2, 2025
2 parents b95e224 + d8d61f8 commit a4a153b
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 23 deletions.
1 change: 1 addition & 0 deletions DATA/assets/差异.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
国际服

国服
咖啡厅左上角标题会改为 咖啡厅
礼服日奈的fes也许会把竞技场的跳过战斗文字改动。
礼服日奈的fes会把社团的入口改动
Binary file modified DATA/assets_cn/BUTTON/BUTTON_CAFE_SET_ROOM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DATA/assets_cn/PAGE/PAGE_WANTED.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DATA/assets_cn/POPUP/POPUP_TASK_INFO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions gui/pages/Setting_task_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def select_clear_all_and_refresh_task_order(type="select"):

@ui.refreshable
def task_order():
with ui.row():
# 第一行添加上添加按钮
ui.button(f'{config.get_text("button_add")} {config.get_text("config_task")}', on_click=lambda: add_task(0))
for i in range(len(config.userconfigdict["TASK_ORDER"])):
with ui.row():
ui.label(f'{config.get_text("config_task")} {i+1}:')
Expand All @@ -33,10 +36,6 @@ def task_order():
acheck = ui.checkbox(config.get_text("button_enable"), value=config.userconfigdict["TASK_ACTIVATE"][i], on_change=lambda v,i=i: config.userconfigdict["TASK_ACTIVATE"].__setitem__(i, v.value))
ui.button(f'{config.get_text("button_add")} {config.get_text("config_task")}', on_click=lambda i=i+1: add_task(i))
ui.button(f'{config.get_text("button_delete")} {config.get_text("config_task")}', on_click=lambda i=i: del_task(i), color="red")
with ui.row():
# 最后一行添加上添加按钮和删除按钮
ui.button(f'{config.get_text("button_add")} {config.get_text("config_task")}', on_click=lambda: add_task(0))
ui.button(f'{config.get_text("button_delete")} {config.get_text("config_task")}', on_click=lambda: del_task(-1), color="red")

def add_task(i):
config.userconfigdict["TASK_ORDER"].insert(i, TaskName.MAIL)
Expand Down
17 changes: 2 additions & 15 deletions modules/AllTask/InClub/InClub.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,9 @@ def pre_condition(self) -> bool:


def on_run(self) -> None:
if config.userconfigdict["SERVER_TYPE"] in ["JP", "GLOBAL", "GLOBAL_EN"]:
# 日服, 国际服适配新界面
click((565, 669), sleeptime=3)
click((299, 330), sleeptime=3)
else:
self.run_until(
lambda: click((563, 665)),
lambda: Page.is_page(PageName.PAGE_CLUB),
sleeptime=2
)
self.run_until(
lambda: self.back_to_home(),
lambda: Page.is_page(PageName.PAGE_HOME),
)
click((565, 669), sleeptime=3)
click((299, 330), sleeptime=3)



def post_condition(self) -> bool:
return self.back_to_home()
2 changes: 1 addition & 1 deletion modules/AllTask/InCraft/InCraft.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, name="InCraft") -> None:
self.COLOR_BUTTON_CRAFT_YELLOW = self.COLOR_CRAFT_DONE
# 制造材料清单从上到下三个点的位置
# 国服下方没有一键收集按钮,因此三个点偏下
offsetY = 20 if "CN" in config.userconfigdict["SERVER_TYPE"] else 0
offsetY = 0
items_ys = np.linspace(285, 530, 3, dtype=int)
self.items_pos = [(1130, y+offsetY) for y in items_ys]

Expand Down
6 changes: 4 additions & 2 deletions modules/AllTask/SolveChallenge/SolveChallenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ def on_run(self) -> None:
lambda: not match_pixel((1195, 130), Page.COLOR_WHITE)
)
# 处理第n个挑战任务
ScrollSelect(self.scroll_down_index, 141, 273, 613, 1150, hasexpectimage=lambda: not match_pixel(Page.MAGICPOINT, Page.COLOR_WHITE), swipeoffsetx=-200).run()
scroll_task = ScrollSelect(self.scroll_down_index, 153, 285, 625, 1150, hasexpectimage=lambda: not match_pixel(Page.MAGICPOINT, Page.COLOR_WHITE), swipeoffsetx=-200)
scroll_task.run()
if not self.has_popup():
logging.warn(istr({
CN: "无法识别跳转弹窗",
EN: "can not recognize popup window"
}))
return
click((1193, 144), sleeptime=3)
blue_button_pos = scroll_task.wantclick_pos
click((blue_button_pos[0] + 36, blue_button_pos[1] - 80), sleeptime=3)
screenshot()
# 通过识别弹窗后右侧像素颜色判断是困难还是普通
pixel_r = match_pixel((1181,159), ((0,0,50), (30, 30, 80)))
Expand Down
2 changes: 1 addition & 1 deletion modules/configs/MyConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MyConfigger:
"""
维护config字典,包含软件config,用户任务config,语言包
"""
NOWVERSION="1.8.5"
NOWVERSION="1.8.6"
USER_CONFIG_FOLDER="./BAAH_CONFIGS"
SOFTWARE_CONFIG_FOLDER="./DATA/CONFIGS"
LANGUAGE_PACKAGE_FOLDER="./DATA/i18n"
Expand Down

0 comments on commit a4a153b

Please sign in to comment.