Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
CHNZYX committed Mar 8, 2024
1 parent 81e1a7e commit 537c941
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
16 changes: 8 additions & 8 deletions gui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,22 +222,22 @@ def getnum():
ft.Row(
[
txt,
ft.IconButton(
icon=ft.icons.DELETE,
tooltip="清空通关计数",
icon_size=35,
on_click=go_del,
),
# ft.IconButton(
# icon=ft.icons.DELETE,
# tooltip="清空通关计数",
# icon_size=35,
# on_click=go_del,
# ),
]
),
ft.Row(
[
ft.Text("上限次数:"),
ft.Text("本轮运行:",weight=ft.FontWeight.W_400,size=18),
ft.TextButton(
text=str(config.max_run),
on_click=lambda _: go_input_x(page),
),
ft.Text("次(-1为无限循环)"),
ft.Text("次(-1为无限循环)",weight=ft.FontWeight.W_400,size=18),
]
),
ft.Container(height=100),
Expand Down
30 changes: 14 additions & 16 deletions states.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import utils.keyops as keyops

# 版本号
version = "v6.12"
version = "v6.2"


class SimulatedUniverse(UniverseUtils):
Expand Down Expand Up @@ -97,7 +97,7 @@ def __init__(
self.nums = nums
self.end = 0
ex_notif = ""
if not debug:
if debug != 2:
pyautogui.FAILSAFE = False
if bonus:
ex_notif = " 自动领取沉浸奖励"
Expand Down Expand Up @@ -227,21 +227,19 @@ def end_of_uni(self):
self.update_count(0)
self.my_cnt += 1
tm = int((time.time() - self.init_tm) / 60)
remain = 34 - self.count
if remain > 0:
remain = int(remain * (time.time() - self.init_tm) / self.my_cnt / 60)
remain_round = self.nums-self.my_cnt
if remain_round > 0:
remain = int(remain_round * (time.time() - self.init_tm) / self.my_cnt / 60)
else:
remain = 0
if (
notif(
"已完成",
f"计数:{self.count} 已使用:{tm//60}小时{tm%60}分钟 平均{tm//self.my_cnt}分钟一次 预计剩余{remain//60}小时{remain%60}分钟",
cnt=str(self.count),
)
>= 34
and self.debug == 0 and self.check_bonus == 0
) and self.nums == self.my_cnt:
log.info('已完成每周上限,准备停止运行')
remain_round = -1
notif(
"已完成",
f"计数:{self.count} 剩余:{remain_round} 已使用:{tm//60}小时{tm%60}分钟 平均{tm//self.my_cnt}分钟一次 预计剩余{remain//60}小时{remain%60}分钟",
cnt=str(self.count),
)
if self.debug == 0 and self.check_bonus == 0 and self.nums <= self.my_cnt:
log.info('已完成上限,准备停止运行')
self.end = 1
self.floor = 0

Expand Down Expand Up @@ -732,7 +730,7 @@ def normal(self):
elif self.check("yes1", 0.5, 0.5, mask="mask_end"):
self.click((self.tx,self.ty))
time.sleep(1)
return 1
return 0
else:
return 0
return 1
Expand Down

0 comments on commit 537c941

Please sign in to comment.