diff --git a/alas.py b/alas.py index 34871f274..d6ab4861f 100644 --- a/alas.py +++ b/alas.py @@ -42,6 +42,7 @@ class AzurLaneAutoScript: print(f'{key} = {value}') logger.hr('Settings saved') + self.config.config_check() def reward(self): for key, value in self.config.config['Reward'].items(): diff --git a/module/config/argparser.py b/module/config/argparser.py index 9d339a0ba..433dd3d09 100644 --- a/module/config/argparser.py +++ b/module/config/argparser.py @@ -141,12 +141,12 @@ def main(ini_name=''): f1.add_argument('--舰队步长1', default=default('--舰队步长1'), choices=['1', '2', '3', '4', '5', '6']) f2 = fleet.add_argument_group('BOSS队') - f2.add_argument('--舰队编号2', default=default('--舰队编号2'), choices=['不使用', '1', '2', '3', '4', '5', '6']) + f2.add_argument('--舰队编号2', default=default('--舰队编号2'), choices=['1', '2', '3', '4', '5', '6']) f2.add_argument('--舰队阵型2', default=default('--舰队阵型2'), choices=['单纵阵', '复纵阵', '轮形阵']) f2.add_argument('--舰队步长2', default=default('--舰队步长2'), choices=['1', '2', '3', '4', '5', '6']) f3 = fleet.add_argument_group('备用道中队') - f3.add_argument('--舰队编号3', default=default('--舰队编号3'), choices=['不使用', '1', '2', '3', '4', '5', '6']) + f3.add_argument('--舰队编号3', default=default('--舰队编号3'), choices=['1', '2', '3', '4', '5', '6']) f3.add_argument('--舰队阵型3', default=default('--舰队阵型3'), choices=['单纵阵', '复纵阵', '轮形阵']) f3.add_argument('--舰队步长3', default=default('--舰队步长3'), choices=['1', '2', '3', '4', '5', '6']) diff --git a/module/config/argparser_en.py b/module/config/argparser_en.py index 317ceab09..bbaa56b13 100644 --- a/module/config/argparser_en.py +++ b/module/config/argparser_en.py @@ -139,12 +139,12 @@ def main(ini_name=''): f1.add_argument('--fleet_step_1', default=default('--fleet_step_1'), choices=['1', '2', '3', '4', '5', '6'], help='In event map, fleet has limit on moving, so fleet_step is how far can a fleet goes in one operation, if map cleared, it will be ignored') f2 = fleet.add_argument_group('Boss Fleet') - f2.add_argument('--fleet_index_2', default=default('--fleet_index_2'), choices=['do_not_use', '1', '2', '3', '4', '5', '6']) + f2.add_argument('--fleet_index_2', default=default('--fleet_index_2'), choices=['1', '2', '3', '4', '5', '6']) f2.add_argument('--fleet_formation_2', default=default('--fleet_formation_2'), choices=['Line Ahead', 'Double Line', 'Diamond']) f2.add_argument('--fleet_step_2', default=default('--fleet_step_2'), choices=['1', '2', '3', '4', '5', '6'], help='In event map, fleet has limit on moving, so fleet_step is how far can a fleet goes in one operation, if map cleared, it will be ignored') f3 = fleet.add_argument_group('Alternate Mob Fleet') - f3.add_argument('--fleet_index_3', default=default('--fleet_index_3'), choices=['do_not_use', '1', '2', '3', '4', '5', '6']) + f3.add_argument('--fleet_index_3', default=default('--fleet_index_3'), choices=['1', '2', '3', '4', '5', '6']) f3.add_argument('--fleet_formation_3', default=default('--fleet_formation_3'), choices=['Line Ahead', 'Double Line', 'Diamond']) f3.add_argument('--fleet_step_3', default=default('--fleet_step_3'), choices=['1', '2', '3', '4', '5', '6'], help='In event map, fleet has limit on moving, so fleet_step is how far can a fleet goes in one operation, if map cleared, it will be ignored') diff --git a/module/config/config.py b/module/config/config.py index ee9b01791..1a4745407 100644 --- a/module/config/config.py +++ b/module/config/config.py @@ -375,6 +375,13 @@ class AzurLaneConfig: self.CONFIG_FILE = f'./config/{name}.ini' self.config.read_file(codecs.open(self.CONFIG_FILE, "r", "utf8")) self.load_from_config(self.config) + self.config_check() + + def config_check(self): + if self.FLEET_1 == self.FLEET_2: + logger.warning(f'Mob fleet [{self.FLEET_1}] and boss fleet [{self.FLEET_2}] is the same') + logger.warning('They should to be set to different fleets') + exit(1) def save(self): self.config.write(codecs.open(self.CONFIG_FILE, "w+", "utf8")) diff --git a/module/ui/ui.py b/module/ui/ui.py index 028a6db61..4182c9774 100644 --- a/module/ui/ui.py +++ b/module/ui/ui.py @@ -30,7 +30,7 @@ class UI(ModuleBase): logger.hr('UI click') if appear_button is None: appear_button = click_button - click_timer = Timer(retry_wait, count=6) + click_timer = Timer(retry_wait, count=retry_wait // 0.5) while 1: if skip_first_screenshot: skip_first_screenshot = False