mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-18 10:21:30 +08:00
fix: retirement button bug
This commit is contained in:
@@ -335,9 +335,7 @@ class Retirement(Enhancement):
|
|||||||
sim, button = template.match_result(self.device.image.resize(size=(1189, 669)))
|
sim, button = template.match_result(self.device.image.resize(size=(1189, 669)))
|
||||||
|
|
||||||
if sim > self.config.COMMON_CV_THRESHOLD:
|
if sim > self.config.COMMON_CV_THRESHOLD:
|
||||||
button.button = tuple(_*155//144 for _ in button.button)
|
return Button(button=tuple(_*155//144 for _ in button.button), area=button.area, color=button.color)
|
||||||
|
|
||||||
return button
|
|
||||||
|
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
@@ -346,9 +344,7 @@ class Retirement(Enhancement):
|
|||||||
sim, button = template.match_result(self.device.image.resize(size=(1189, 669)))
|
sim, button = template.match_result(self.device.image.resize(size=(1189, 669)))
|
||||||
|
|
||||||
if sim > self.config.COMMON_CV_THRESHOLD:
|
if sim > self.config.COMMON_CV_THRESHOLD:
|
||||||
button.button = tuple(_*155//144 for _ in button.button)
|
return Button(button=tuple(_*155//144 for _ in button.button), area=button.area, color=button.color)
|
||||||
|
|
||||||
return button
|
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -371,5 +367,5 @@ if __name__ == '__main__':
|
|||||||
config = AzurLaneConfig('alas_cn')
|
config = AzurLaneConfig('alas_cn')
|
||||||
az = Retirement(config, Device(config=config))
|
az = Retirement(config, Device(config=config))
|
||||||
az.device.screenshot()
|
az.device.screenshot()
|
||||||
|
az.config.RETIRE_KEEP_COMMON_CV = True
|
||||||
az.retire_ships()
|
az.retire_ships()
|
||||||
Reference in New Issue
Block a user