Skip to content

Commit

Permalink
Fix: empty ship head
Browse files Browse the repository at this point in the history
  • Loading branch information
guoh064 committed Aug 28, 2024
1 parent 145ce00 commit 9521385
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 1 deletion.
Binary file added assets/cn/equipment/EMPTY_SHIP_R.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/en/equipment/EMPTY_SHIP_R.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/jp/equipment/EMPTY_SHIP_R.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tw/equipment/EMPTY_SHIP_R.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion module/campaign/gems_farming.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,26 @@ 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.
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):
Expand Down
1 change: 1 addition & 0 deletions module/equipment/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand Down

0 comments on commit 9521385

Please sign in to comment.