mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: return right BP count of target index
This commit is contained in:
parent
40e9004808
commit
d5a4b7c24b
@ -85,14 +85,15 @@ class ShipyardUI(UI):
|
|||||||
Returns:
|
Returns:
|
||||||
Ocr'ed count for index
|
Ocr'ed count for index
|
||||||
"""
|
"""
|
||||||
|
# index(config.SHIPYARD_INDEX) start from 1
|
||||||
# Base Case
|
# Base Case
|
||||||
if index < 0 or index >= len(SHIPYARD_BP_COUNT_GRID.buttons):
|
if index <= 0 or index > len(SHIPYARD_BP_COUNT_GRID.buttons):
|
||||||
logger.warning(f'Cannot parse for count from index {index}')
|
logger.warning(f'Cannot parse for count from index {index}')
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
result = OCR_SHIPYARD_BP_COUNT_GRID.ocr(self.device.image)
|
result = OCR_SHIPYARD_BP_COUNT_GRID.ocr(self.device.image)
|
||||||
|
|
||||||
return result[index]
|
return result[index - 1]
|
||||||
|
|
||||||
def _shipyard_set_series(self, series=1, skip_first_screenshot=True):
|
def _shipyard_set_series(self, series=1, skip_first_screenshot=True):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user