diff --git a/assets/cn/equipment/EMPTY_SHIP_R.png b/assets/cn/equipment/EMPTY_SHIP_R.png new file mode 100644 index 0000000000..2944f8933c Binary files /dev/null and b/assets/cn/equipment/EMPTY_SHIP_R.png differ diff --git a/assets/en/equipment/EMPTY_SHIP_R.png b/assets/en/equipment/EMPTY_SHIP_R.png new file mode 100644 index 0000000000..2944f8933c Binary files /dev/null and b/assets/en/equipment/EMPTY_SHIP_R.png differ diff --git a/assets/jp/equipment/EMPTY_SHIP_R.png b/assets/jp/equipment/EMPTY_SHIP_R.png new file mode 100644 index 0000000000..2944f8933c Binary files /dev/null and b/assets/jp/equipment/EMPTY_SHIP_R.png differ diff --git a/assets/tw/equipment/EMPTY_SHIP_R.png b/assets/tw/equipment/EMPTY_SHIP_R.png new file mode 100644 index 0000000000..2944f8933c Binary files /dev/null and b/assets/tw/equipment/EMPTY_SHIP_R.png differ diff --git a/module/campaign/gems_farming.py b/module/campaign/gems_farming.py index cdb60c5e84..6d548d2b5e 100644 --- a/module/campaign/gems_farming.py +++ b/module/campaign/gems_farming.py @@ -76,7 +76,7 @@ def __init__(self, config, device=None, task=None): key="GemsFarming.GemsFarming.EquipmentCode", ships=['DD', 'bogue', 'hermes', 'langley', 'ranger']) - def current_ship(self): + def current_ship(self, skip_first_screenshot=True): """ Reuse templates in module.retire.assets, which needs different rescaling to match each current flagship. @@ -84,6 +84,18 @@ def current_ship(self): Pages: in: gear_code """ + while 1: + if skip_first_screenshot: + skip_first_screenshot = False + else: + self.device.screenshot() + + # End + if not self.appear(EMPTY_SHIP_R): + break + else: + logger.info('Waiting ship icon loading.') + if TEMPLATE_BOGUE.match(self.device.image, scaling=1.46): # image has rotation return 'bogue' if TEMPLATE_HERMES.match(self.device.image, scaling=124/89): diff --git a/module/equipment/assets.py b/module/equipment/assets.py index 8d521979b4..432840f3eb 100644 --- a/module/equipment/assets.py +++ b/module/equipment/assets.py @@ -4,6 +4,7 @@ # This file was automatically generated by dev_tools/button_extract.py. # Don't modify it manually. +EMPTY_SHIP_R = Button(area={'cn': (192, 359, 268, 435), 'en': (192, 359, 268, 435), 'jp': (192, 359, 268, 435), 'tw': (192, 359, 268, 435)}, color={'cn': (144, 144, 144), 'en': (144, 144, 144), 'jp': (144, 144, 144), 'tw': (144, 144, 144)}, button={'cn': (192, 359, 268, 435), 'en': (192, 359, 268, 435), 'jp': (192, 359, 268, 435), 'tw': (192, 359, 268, 435)}, file={'cn': './assets/cn/equipment/EMPTY_SHIP_R.png', 'en': './assets/en/equipment/EMPTY_SHIP_R.png', 'jp': './assets/jp/equipment/EMPTY_SHIP_R.png', 'tw': './assets/tw/equipment/EMPTY_SHIP_R.png'}) EQUIP_1 = Button(area={'cn': (1211, 274, 1230, 315), 'en': (1200, 273, 1241, 314), 'jp': (1191, 265, 1248, 320), 'tw': (1190, 265, 1249, 319)}, color={'cn': (133, 181, 222), 'en': (77, 130, 192), 'jp': (97, 142, 206), 'tw': (102, 147, 211)}, button={'cn': (1211, 274, 1230, 315), 'en': (1200, 273, 1241, 314), 'jp': (1191, 265, 1248, 320), 'tw': (1190, 265, 1249, 319)}, file={'cn': './assets/cn/equipment/EQUIP_1.png', 'en': './assets/en/equipment/EQUIP_1.png', 'jp': './assets/jp/equipment/EQUIP_1.png', 'tw': './assets/tw/equipment/EQUIP_1.png'}) EQUIP_2 = Button(area={'cn': (1211, 374, 1230, 416), 'en': (1200, 374, 1241, 415), 'jp': (1191, 365, 1248, 420), 'tw': (1190, 365, 1249, 419)}, color={'cn': (130, 179, 220), 'en': (77, 130, 192), 'jp': (94, 138, 201), 'tw': (100, 144, 208)}, button={'cn': (1211, 374, 1230, 416), 'en': (1200, 374, 1241, 415), 'jp': (1191, 365, 1248, 420), 'tw': (1190, 365, 1249, 419)}, file={'cn': './assets/cn/equipment/EQUIP_2.png', 'en': './assets/en/equipment/EQUIP_2.png', 'jp': './assets/jp/equipment/EQUIP_2.png', 'tw': './assets/tw/equipment/EQUIP_2.png'}) EQUIP_3 = Button(area={'cn': (1211, 475, 1230, 517), 'en': (1200, 475, 1241, 516), 'jp': (1190, 467, 1249, 520), 'tw': (1190, 466, 1249, 520)}, color={'cn': (130, 179, 220), 'en': (80, 132, 192), 'jp': (89, 134, 197), 'tw': (97, 142, 205)}, button={'cn': (1211, 475, 1230, 517), 'en': (1200, 475, 1241, 516), 'jp': (1190, 467, 1249, 520), 'tw': (1190, 466, 1249, 520)}, file={'cn': './assets/cn/equipment/EQUIP_3.png', 'en': './assets/en/equipment/EQUIP_3.png', 'jp': './assets/jp/equipment/EQUIP_3.png', 'tw': './assets/tw/equipment/EQUIP_3.png'})