Skip to content

Commit

Permalink
#73 修复一些明显的CE
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorReid committed Nov 27, 2023
1 parent 7239a8e commit 54afa40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/sr/app/routine/forgotten_hall_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@ def _execute_one_round(self) -> int:
return Operation.FAIL

def _update_star(self, star: int):
pass
5 changes: 0 additions & 5 deletions src/sr/operation/unit/battle/wait_battle_reward.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from cv2.typing import MatLike

from basic import str_utils
from basic.i18_utils import gt
from sr.context import Context
from sr.image.sceenshot import battle
Expand All @@ -19,12 +18,8 @@ class WaitBattleReward(Operation):
def __init__(self, ctx: Context, timeout_seconds: int = 1200):
super().__init__(ctx, try_times=3, op_name=gt('等待战斗结束领取奖励', 'ui'),
timeout_seconds=timeout_seconds)
self.start_time: float = 0
self.timeout_seconds: int = timeout_seconds

def _init_before_execute(self):
self.start_time = time.time()

def _execute_one_round(self) -> int:
screen: MatLike = self.screenshot()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import time

from cv2.typing import MatLike, Rect
from cv2.typing import MatLike

from basic import str_utils
from basic import str_utils, Rect
from basic.i18_utils import gt
from basic.img import cv2_utils
from sr.context import Context
Expand Down

0 comments on commit 54afa40

Please sign in to comment.