mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 10:37:36 +08:00
Merge branch 'master' of github.com:LmeSzinc/AzurLaneAutoScript into asset
This commit is contained in:
commit
adbb8f974f
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 5.2 KiB |
@ -21,9 +21,9 @@ MAP_CAT_ATTACK = Button(area={'cn': (1237, 103, 1252, 153), 'en': (1237, 103, 12
|
||||
MAP_OFFENSIVE = Button(area={'cn': (1148, 653, 1262, 705), 'en': (1147, 652, 1263, 701), 'jp': (1147, 652, 1263, 706), 'tw': (1148, 653, 1262, 705)}, color={'cn': (234, 180, 108), 'en': (234, 183, 108), 'jp': (233, 184, 105), 'tw': (234, 180, 108)}, button={'cn': (1148, 653, 1262, 705), 'en': (1147, 652, 1263, 701), 'jp': (1147, 652, 1263, 706), 'tw': (1148, 653, 1262, 705)}, file={'cn': './assets/cn/map/MAP_OFFENSIVE.png', 'en': './assets/en/map/MAP_OFFENSIVE.png', 'jp': './assets/jp/map/MAP_OFFENSIVE.png', 'tw': './assets/tw/map/MAP_OFFENSIVE.png'})
|
||||
MAP_PREPARATION = Button(area={'cn': (854, 488, 1052, 548), 'en': (852, 489, 1054, 553), 'jp': (850, 485, 1051, 548), 'tw': (854, 488, 1052, 548)}, color={'cn': (236, 186, 115), 'en': (234, 179, 93), 'jp': (232, 181, 101), 'tw': (236, 186, 115)}, button={'cn': (854, 488, 1052, 548), 'en': (852, 489, 1054, 553), 'jp': (850, 485, 1051, 548), 'tw': (854, 488, 1052, 548)}, file={'cn': './assets/cn/map/MAP_PREPARATION.png', 'en': './assets/en/map/MAP_PREPARATION.png', 'jp': './assets/jp/map/MAP_PREPARATION.png', 'tw': './assets/tw/map/MAP_PREPARATION.png'})
|
||||
MAP_PREPARATION_CANCEL = Button(area={'cn': (234, 12, 278, 47), 'en': (234, 12, 278, 47), 'jp': (234, 12, 278, 47), 'tw': (234, 12, 278, 47)}, color={'cn': (45, 46, 69), 'en': (45, 46, 69), 'jp': (45, 46, 69), 'tw': (45, 46, 69)}, button={'cn': (234, 12, 278, 47), 'en': (234, 12, 278, 47), 'jp': (234, 12, 278, 47), 'tw': (234, 12, 278, 47)}, file={'cn': './assets/cn/map/MAP_PREPARATION_CANCEL.png', 'en': './assets/en/map/MAP_PREPARATION_CANCEL.png', 'jp': './assets/jp/map/MAP_PREPARATION_CANCEL.png', 'tw': './assets/tw/map/MAP_PREPARATION_CANCEL.png'})
|
||||
SUBMARINE_BAR = Button(area={'cn': (1015, 525, 1186, 602), 'en': (996, 524, 1167, 601), 'jp': (998, 528, 1169, 605), 'tw': (998, 528, 1169, 605)}, color={'cn': (193, 178, 146), 'en': (193, 177, 144), 'jp': (191, 176, 145), 'tw': (192, 177, 145)}, button={'cn': (1015, 525, 1186, 602), 'en': (996, 524, 1167, 601), 'jp': (998, 528, 1169, 605), 'tw': (998, 528, 1169, 605)}, file={'cn': './assets/cn/map/SUBMARINE_BAR.png', 'en': './assets/en/map/SUBMARINE_BAR.png', 'jp': './assets/jp/map/SUBMARINE_BAR.png', 'tw': './assets/tw/map/SUBMARINE_BAR.png'})
|
||||
SUBMARINE_CHOOSE = Button(area={'cn': (1026, 448, 1088, 505), 'en': (1004, 447, 1067, 504), 'jp': (1008, 450, 1072, 508), 'tw': (1009, 451, 1071, 508)}, color={'cn': (200, 157, 99), 'en': (197, 148, 82), 'jp': (197, 157, 101), 'tw': (209, 165, 104)}, button={'cn': (1026, 448, 1088, 505), 'en': (1004, 447, 1067, 504), 'jp': (1008, 450, 1072, 508), 'tw': (1009, 451, 1071, 508)}, file={'cn': './assets/cn/map/SUBMARINE_CHOOSE.png', 'en': './assets/en/map/SUBMARINE_CHOOSE.png', 'jp': './assets/jp/map/SUBMARINE_CHOOSE.png', 'tw': './assets/tw/map/SUBMARINE_CHOOSE.png'})
|
||||
SUBMARINE_CLEAR = Button(area={'cn': (1109, 448, 1170, 505), 'en': (1090, 447, 1153, 504), 'jp': (1092, 450, 1151, 508), 'tw': (1091, 451, 1153, 508)}, color={'cn': (153, 153, 154), 'en': (137, 138, 140), 'jp': (148, 149, 151), 'tw': (154, 154, 156)}, button={'cn': (1109, 448, 1170, 505), 'en': (1090, 447, 1153, 504), 'jp': (1092, 450, 1151, 508), 'tw': (1091, 451, 1153, 508)}, file={'cn': './assets/cn/map/SUBMARINE_CLEAR.png', 'en': './assets/en/map/SUBMARINE_CLEAR.png', 'jp': './assets/jp/map/SUBMARINE_CLEAR.png', 'tw': './assets/tw/map/SUBMARINE_CLEAR.png'})
|
||||
SUBMARINE_BAR = Button(area={'cn': (1015, 525, 1186, 602), 'en': (998, 528, 1169, 605), 'jp': (998, 528, 1169, 605), 'tw': (998, 528, 1169, 605)}, color={'cn': (193, 178, 146), 'en': (192, 177, 145), 'jp': (191, 176, 145), 'tw': (192, 177, 145)}, button={'cn': (1015, 525, 1186, 602), 'en': (998, 528, 1169, 605), 'jp': (998, 528, 1169, 605), 'tw': (998, 528, 1169, 605)}, file={'cn': './assets/cn/map/SUBMARINE_BAR.png', 'en': './assets/en/map/SUBMARINE_BAR.png', 'jp': './assets/jp/map/SUBMARINE_BAR.png', 'tw': './assets/tw/map/SUBMARINE_BAR.png'})
|
||||
SUBMARINE_CHOOSE = Button(area={'cn': (1026, 448, 1088, 505), 'en': (1008, 451, 1071, 508), 'jp': (1008, 450, 1072, 508), 'tw': (1009, 451, 1071, 508)}, color={'cn': (200, 157, 99), 'en': (197, 148, 83), 'jp': (197, 157, 101), 'tw': (209, 165, 104)}, button={'cn': (1026, 448, 1088, 505), 'en': (1008, 451, 1071, 508), 'jp': (1008, 450, 1072, 508), 'tw': (1009, 451, 1071, 508)}, file={'cn': './assets/cn/map/SUBMARINE_CHOOSE.png', 'en': './assets/en/map/SUBMARINE_CHOOSE.png', 'jp': './assets/jp/map/SUBMARINE_CHOOSE.png', 'tw': './assets/tw/map/SUBMARINE_CHOOSE.png'})
|
||||
SUBMARINE_CLEAR = Button(area={'cn': (1109, 448, 1170, 505), 'en': (1091, 451, 1153, 508), 'jp': (1092, 450, 1151, 508), 'tw': (1091, 451, 1153, 508)}, color={'cn': (153, 153, 154), 'en': (139, 140, 142), 'jp': (148, 149, 151), 'tw': (154, 154, 156)}, button={'cn': (1109, 448, 1170, 505), 'en': (1091, 451, 1153, 508), 'jp': (1092, 450, 1151, 508), 'tw': (1091, 451, 1153, 508)}, file={'cn': './assets/cn/map/SUBMARINE_CLEAR.png', 'en': './assets/en/map/SUBMARINE_CLEAR.png', 'jp': './assets/jp/map/SUBMARINE_CLEAR.png', 'tw': './assets/tw/map/SUBMARINE_CLEAR.png'})
|
||||
SUBMARINE_IN_USE = Button(area={'cn': (453, 438, 538, 523), 'en': (453, 438, 538, 523), 'jp': (453, 438, 538, 523), 'tw': (453, 438, 538, 523)}, color={'cn': (118, 114, 124), 'en': (118, 114, 124), 'jp': (118, 114, 124), 'tw': (118, 114, 124)}, button={'cn': (453, 438, 538, 523), 'en': (453, 438, 538, 523), 'jp': (453, 438, 538, 523), 'tw': (453, 438, 538, 523)}, file={'cn': './assets/cn/map/SUBMARINE_IN_USE.png', 'en': './assets/en/map/SUBMARINE_IN_USE.png', 'jp': './assets/jp/map/SUBMARINE_IN_USE.png', 'tw': './assets/tw/map/SUBMARINE_IN_USE.png'})
|
||||
SWITCH_OVER = Button(area={'cn': (947, 654, 1118, 706), 'en': (945, 647, 1119, 702), 'jp': (946, 653, 1119, 707), 'tw': (947, 654, 1118, 706)}, color={'cn': (144, 158, 198), 'en': (139, 154, 194), 'jp': (142, 156, 195), 'tw': (144, 158, 198)}, button={'cn': (947, 654, 1118, 706), 'en': (945, 647, 1119, 702), 'jp': (946, 653, 1119, 707), 'tw': (947, 654, 1118, 706)}, file={'cn': './assets/cn/map/SWITCH_OVER.png', 'en': './assets/en/map/SWITCH_OVER.png', 'jp': './assets/jp/map/SWITCH_OVER.png', 'tw': './assets/tw/map/SWITCH_OVER.png'})
|
||||
WITHDRAW = Button(area={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702), 'jp': (748, 653, 921, 707), 'tw': (749, 654, 921, 707)}, color={'cn': (213, 124, 124), 'en': (211, 124, 124), 'jp': (210, 122, 122), 'tw': (213, 124, 124)}, button={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702), 'jp': (748, 653, 921, 707), 'tw': (749, 654, 921, 707)}, file={'cn': './assets/cn/map/WITHDRAW.png', 'en': './assets/en/map/WITHDRAW.png', 'jp': './assets/jp/map/WITHDRAW.png', 'tw': './assets/tw/map/WITHDRAW.png'})
|
||||
|
@ -85,14 +85,15 @@ class ShipyardUI(UI):
|
||||
Returns:
|
||||
Ocr'ed count for index
|
||||
"""
|
||||
# index(config.SHIPYARD_INDEX) start from 1
|
||||
# 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}')
|
||||
return -1
|
||||
|
||||
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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user