mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-05-14 23:43:10 +08:00
Fix: buy food may be triggerred more than once
This commit is contained in:
@@ -508,7 +508,6 @@ class RewardCommission(UI, InfoHandler):
|
|||||||
logger.hr('Reward receive')
|
logger.hr('Reward receive')
|
||||||
|
|
||||||
reward = False
|
reward = False
|
||||||
food = False
|
|
||||||
click_timer = Timer(1)
|
click_timer = Timer(1)
|
||||||
with self.stat.new(
|
with self.stat.new(
|
||||||
'commission', method=self.config.DropRecord_CommissionRecord
|
'commission', method=self.config.DropRecord_CommissionRecord
|
||||||
@@ -560,14 +559,12 @@ class RewardCommission(UI, InfoHandler):
|
|||||||
# click_timer.reset()
|
# click_timer.reset()
|
||||||
continue
|
continue
|
||||||
# handle oil maxed
|
# handle oil maxed
|
||||||
# run once to prevent accidental oil consumption
|
|
||||||
if self.config.SERVER in ['cn']:
|
if self.config.SERVER in ['cn']:
|
||||||
if not food and self.appear(OIL_MAXED, offset=(20, 20), interval=3):
|
if self.appear(OIL_MAXED, offset=(20, 20), interval=3):
|
||||||
logger.info("Oil maxed, buy food to consume oil")
|
logger.info("Oil maxed, buy food to consume oil")
|
||||||
RewardDorm(self.config, self.device).dorm_run(
|
RewardDorm(self.config, self.device).dorm_run(
|
||||||
feed=False, collect=False, buy_furniture=False, buy_food=10)
|
feed=False, collect=False, buy_furniture=False, buy_food=10)
|
||||||
self.ui_ensure(page_reward)
|
self.ui_ensure(page_reward)
|
||||||
food = True
|
|
||||||
continue
|
continue
|
||||||
# Check GET_SHIP at last to handle random white background at page_main
|
# Check GET_SHIP at last to handle random white background at page_main
|
||||||
for button in [GET_SHIP]:
|
for button in [GET_SHIP]:
|
||||||
|
|||||||
Reference in New Issue
Block a user