mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-06 05:29:05 +08:00
Upd: wait oil until the same as last
This commit is contained in:
@@ -126,6 +126,7 @@ class CampaignStatus(UI):
|
|||||||
int: Oil amount
|
int: Oil amount
|
||||||
"""
|
"""
|
||||||
_oil = {}
|
_oil = {}
|
||||||
|
last = 0
|
||||||
timeout = Timer(1, count=2).start()
|
timeout = Timer(1, count=2).start()
|
||||||
while 1:
|
while 1:
|
||||||
if skip_first_screenshot:
|
if skip_first_screenshot:
|
||||||
@@ -145,8 +146,9 @@ class CampaignStatus(UI):
|
|||||||
'Value': self._get_num(OCR_OIL, 'OCR_OIL', (247, 247, 247)),
|
'Value': self._get_num(OCR_OIL, 'OCR_OIL', (247, 247, 247)),
|
||||||
'Limit': self._get_num(OCR_OIL_LIMIT, 'OCR_OIL_LIMIT', (247, 247, 247))
|
'Limit': self._get_num(OCR_OIL_LIMIT, 'OCR_OIL_LIMIT', (247, 247, 247))
|
||||||
}
|
}
|
||||||
if _oil['Value'] >= 100:
|
if last == _oil['Value'] and _oil['Value'] >= 100 and _oil['Limit'] <= 50000:
|
||||||
break
|
break
|
||||||
|
last = _oil['Value']
|
||||||
LogRes(self.config).Oil = _oil
|
LogRes(self.config).Oil = _oil
|
||||||
if update:
|
if update:
|
||||||
self.config.update()
|
self.config.update()
|
||||||
|
|||||||
@@ -103,12 +103,12 @@ class CampaignRun(CampaignEvent, ShopStatus):
|
|||||||
_oil = self.get_oil()
|
_oil = self.get_oil()
|
||||||
if _oil < max(500, self.config.StopCondition_OilLimit):
|
if _oil < max(500, self.config.StopCondition_OilLimit):
|
||||||
logger.hr('Triggered stop condition: Oil limit')
|
logger.hr('Triggered stop condition: Oil limit')
|
||||||
self.config.task_delay(minute=(120, 240))
|
self.config.task_delay(minute=60)
|
||||||
return True
|
return True
|
||||||
# Auto search oil limit
|
# Auto search oil limit
|
||||||
if self.campaign.auto_search_oil_limit_triggered:
|
if self.campaign.auto_search_oil_limit_triggered:
|
||||||
logger.hr('Triggered stop condition: Auto search oil limit')
|
logger.hr('Triggered stop condition: Auto search oil limit')
|
||||||
self.config.task_delay(minute=(120, 240))
|
self.config.task_delay(minute=60)
|
||||||
return True
|
return True
|
||||||
# If Get a New Ship
|
# If Get a New Ship
|
||||||
if self.config.StopCondition_GetNewShip and self.campaign.config.GET_SHIP_TRIGGERED:
|
if self.config.StopCondition_GetNewShip and self.campaign.config.GET_SHIP_TRIGGERED:
|
||||||
|
|||||||
Reference in New Issue
Block a user