mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-16 02:19:53 +08:00
Merge remote-tracking branch 'origin/bug_fix' into bug_fix
This commit is contained in:
@@ -10,12 +10,20 @@ class GitManager(DeployConfig):
|
|||||||
def git(self):
|
def git(self):
|
||||||
return self.filepath('GitExecutable')
|
return self.filepath('GitExecutable')
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def remove(file):
|
||||||
|
try:
|
||||||
|
os.remove(file)
|
||||||
|
logger.info(f'Removed file: {file}')
|
||||||
|
except FileNotFoundError:
|
||||||
|
logger.info(f'File not found: {file}')
|
||||||
|
|
||||||
def git_repository_init(self, repo, source='origin', branch='master', proxy='', keep_changes=False):
|
def git_repository_init(self, repo, source='origin', branch='master', proxy='', keep_changes=False):
|
||||||
logger.hr('Git Init', 1)
|
logger.hr('Git Init', 1)
|
||||||
if not self.execute(f'"{self.git}" init', allow_failure=True):
|
if not self.execute(f'"{self.git}" init', allow_failure=True):
|
||||||
os.remove('./.git/config')
|
self.remove('./.git/config')
|
||||||
os.remove('./.git/index')
|
self.remove('./.git/index')
|
||||||
os.remove('./.git/HEAD')
|
self.remove('./.git/HEAD')
|
||||||
self.execute(f'"{self.git}" init')
|
self.execute(f'"{self.git}" init')
|
||||||
|
|
||||||
logger.hr('Set Git Proxy', 1)
|
logger.hr('Set Git Proxy', 1)
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ from module.equipment.fleet_equipment import OCR_FLEET_INDEX
|
|||||||
from module.exception import CampaignEnd
|
from module.exception import CampaignEnd
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from module.map.assets import FLEET_PREPARATION, MAP_PREPARATION
|
from module.map.assets import FLEET_PREPARATION, MAP_PREPARATION
|
||||||
|
from module.combat.assets import BATTLE_PREPARATION
|
||||||
from module.ocr.ocr import Digit
|
from module.ocr.ocr import Digit
|
||||||
from module.retire.assets import DOCK_CHECK, TEMPLATE_BOGUE, TEMPLATE_HERMES, TEMPLATE_LANGLEY, TEMPLATE_RANGER
|
from module.retire.assets import DOCK_CHECK, TEMPLATE_BOGUE, TEMPLATE_HERMES, TEMPLATE_LANGLEY, TEMPLATE_RANGER
|
||||||
from module.retire.dock import Dock, CARD_GRIDS, CARD_EMOTION_GRIDS, CARD_LEVEL_GRIDS
|
from module.retire.dock import Dock, CARD_GRIDS, CARD_EMOTION_GRIDS, CARD_LEVEL_GRIDS
|
||||||
from module.ui.page import page_fleet
|
from module.ui.page import page_fleet
|
||||||
|
from module.ui.ui import BACK_ARROW
|
||||||
|
|
||||||
SIM_VALUE = 0.95
|
SIM_VALUE = 0.95
|
||||||
|
|
||||||
@@ -35,6 +37,9 @@ class GemsCampaignOverride(CampaignBase):
|
|||||||
if self.handle_popup_cancel('IGNORE_LOW_EMOTION'):
|
if self.handle_popup_cancel('IGNORE_LOW_EMOTION'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if self.appear(BATTLE_PREPARATION, offset=(20, 20), interval=2):
|
||||||
|
self.device.click(BACK_ARROW)
|
||||||
|
|
||||||
if self.is_in_map():
|
if self.is_in_map():
|
||||||
self.withdraw()
|
self.withdraw()
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user