mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-17 00:15:13 +00:00
perf(bounty): improve ending logic
This commit is contained in:
parent
5e4abc147e
commit
bbf3bf7c36
@ -61,12 +61,11 @@ class Bounty(BountyUI):
|
|||||||
match status:
|
match status:
|
||||||
case BountyStatus.OCR:
|
case BountyStatus.OCR:
|
||||||
if self.get_ticket():
|
if self.get_ticket():
|
||||||
|
if self.current_ticket == 0 or not self.task:
|
||||||
|
return BountyStatus.FINISH
|
||||||
return BountyStatus.SELECT
|
return BountyStatus.SELECT
|
||||||
case BountyStatus.SELECT:
|
case BountyStatus.SELECT:
|
||||||
if not self.is_ticket_enough:
|
if not self.is_ticket_enough:
|
||||||
if self.current_ticket == 0:
|
|
||||||
logger.info('Bounty ticket empty')
|
|
||||||
return BountyStatus.FINISH
|
|
||||||
logger.warning('Bounty ticket not enough')
|
logger.warning('Bounty ticket not enough')
|
||||||
raise RequestHumanTakeover
|
raise RequestHumanTakeover
|
||||||
if self.select_bounty(*self.current_bounty):
|
if self.select_bounty(*self.current_bounty):
|
||||||
@ -77,8 +76,6 @@ class Bounty(BountyUI):
|
|||||||
case BountyStatus.SWEEP:
|
case BountyStatus.SWEEP:
|
||||||
if self.do_sweep(self.current_count):
|
if self.do_sweep(self.current_count):
|
||||||
self.task.pop(0)
|
self.task.pop(0)
|
||||||
if not self.task:
|
|
||||||
return BountyStatus.FINISH
|
|
||||||
return BountyStatus.END
|
return BountyStatus.END
|
||||||
return BountyStatus.ENTER
|
return BountyStatus.ENTER
|
||||||
case BountyStatus.END:
|
case BountyStatus.END:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user