@@ -113,10 +113,11 @@ def quit_mission(self, timeout=10):
113113 self .find_quit_btn , time_out = action_timeout , raise_if_not_found = True
114114 )
115115 self .sleep (0.5 )
116- self .click_until (
117- click_func = lambda : self .click_box ( quit_btn , after_sleep = 0.25 ),
118- check_func = lambda : not self .find_quit_btn ( ),
116+ self .wait_until (
117+ condition = lambda : not self .find_quit_btn ( ),
118+ post_action = lambda : self .click_box ( quit_btn , after_sleep = 0.25 ),
119119 time_out = action_timeout ,
120+ raise_if_not_found = True ,
120121 )
121122 self .sleep (1 )
122123 self .wait_until (
@@ -128,18 +129,18 @@ def give_up_mission(self, timeout=10):
128129 box = self .box_of_screen_scaled (2560 , 1440 , 1310 , 788 , 1352 , 830 , name = "start_mission" , hcenter = True )
129130 self .open_in_mission_menu ()
130131
131- self .click_until (
132- click_func = lambda : self .click_relative ( 0.95 , 0.91 ),
133- check_func = lambda : self .find_start_btn ( box = box ),
132+ self .wait_until (
133+ condition = lambda : self .find_start_btn ( box = box ),
134+ post_action = lambda : self .click_relative ( 0.95 , 0.91 , after_sleep = 0.25 ),
134135 time_out = action_timeout ,
136+ raise_if_not_found = True ,
135137 )
136138 self .sleep (0.5 )
137- self .click_until (
138- click_func = lambda : self .wait_click_box (
139- lambda : self .find_start_btn (box = box ), time_out = 0.25
140- ),
141- check_func = lambda : not self .find_start_btn (box = box ),
139+ self .wait_until (
140+ condition = lambda : not self .find_start_btn (box = box ),
141+ post_action = lambda : self .click_box (self .find_start_btn (box = box ), after_sleep = 0.25 ),
142142 time_out = action_timeout ,
143+ raise_if_not_found = True ,
143144 )
144145
145146 def continue_mission (self , timeout = 10 ):
@@ -149,10 +150,11 @@ def continue_mission(self, timeout=10):
149150 continue_btn = self .wait_until (
150151 self .find_continue_btn , time_out = action_timeout , raise_if_not_found = True
151152 )
152- self .click_until (
153- click_func = lambda : self .click_box ( continue_btn , after_sleep = 0.25 ),
154- check_func = lambda : not self .find_continue_btn ( ),
153+ self .wait_until (
154+ condition = lambda : not self .find_continue_btn ( ),
155+ post_action = lambda : self .click_box ( continue_btn , after_sleep = 0.25 ),
155156 time_out = action_timeout ,
157+ raise_if_not_found = True ,
156158 )
157159 self .sleep (0.5 )
158160 return True
@@ -162,10 +164,11 @@ def choose_drop_rate(self, timeout=10):
162164 self .sleep (0.5 )
163165 self .choose_drop_rate_item ()
164166 box = self .box_of_screen_scaled (2560 , 1440 , 1067 , 940 , 1415 , 992 , name = "drop_rate_btn" , hcenter = True )
165- self .click_until (
166- click_func = lambda : self . wait_click_box ( lambda : self .find_start_btn ( box = box ), time_out = 0.25 ),
167- check_func = lambda : not self .find_drop_item ( ),
167+ self .wait_until (
168+ condition = lambda : not self .find_drop_item ( ),
169+ post_action = lambda : self .click_box ( self . find_start_btn ( box = box ), after_sleep = 0.25 ),
168170 time_out = action_timeout ,
171+ raise_if_not_found = True ,
169172 )
170173
171174 def choose_drop_rate_item (self ):
@@ -195,11 +198,11 @@ def choose_letter(self, timeout=10):
195198 self .click (0.56 , 0.5 )
196199 self .move_back_from_safe_position ()
197200 self .sleep (0.5 )
198- self .click (0.56 , 0.5 , after_sleep = 0.5 )
199- self .click_until (
200- click_func = lambda : self .click (0.79 , 0.61 ),
201- check_func = lambda : not self .find_letter_btn (),
201+ self .wait_until (
202+ condition = lambda : not self .find_letter_btn (),
203+ post_action = lambda : self .click (0.79 , 0.61 , after_sleep = 0.25 ),
202204 time_out = action_timeout ,
205+ raise_if_not_found = True ,
203206 )
204207 else :
205208 self .log_info ("需自行选择密函" , True )
@@ -215,10 +218,11 @@ def choose_letter_reward(self, timeout=10):
215218 return
216219 action_timeout = self .safe_get ("action_timeout" , timeout )
217220 if self .config .get ("自动选择首个密函和密函奖励" , False ):
218- self .click_until (
219- click_func = lambda : self .click ( 0.50 , 0.83 ),
220- check_func = lambda : not self .find_letter_reward_btn ( ),
221+ self .wait_until (
222+ condition = lambda : not self .find_letter_reward_btn ( ),
223+ post_action = lambda : self .click ( 0.50 , 0.83 , after_sleep = 0.25 ),
221224 time_out = action_timeout ,
225+ raise_if_not_found = True ,
222226 )
223227 else :
224228 self .log_info ("需自行选择密函奖励" , True )
0 commit comments