diff --git a/config/template.ini b/config/template.ini index 9135c2c14..dbb575237 100644 --- a/config/template.ini +++ b/config/template.ini @@ -124,7 +124,7 @@ command = daily [Main] command = main main_stage = 7-2 -enable_hard_main_campaign = normal +campaign_mode = normal [Event] command = event diff --git a/module/campaign/campaign_ui.py b/module/campaign/campaign_ui.py index 9453ac88b..0c8872bef 100644 --- a/module/campaign/campaign_ui.py +++ b/module/campaign/campaign_ui.py @@ -71,10 +71,11 @@ class CampaignUI(UI, CampaignOcr): entrance.name = name return entrance - def ensure_campaign_ui(self, name): + def ensure_campaign_ui(self, name, mode='normal'): """ Args: name (str): Campaign name, such as '7-2', 'd3', 'sp3'. + mode (str): 'normal' or 'hard'. """ chapter, _ = separate_name(name) @@ -82,7 +83,7 @@ class CampaignUI(UI, CampaignOcr): self.ui_weigh_anchor() self.campaign_ensure_mode('normal') self.campaign_ensure_chapter(index=chapter) - if self.config.ENABLE_HARD_MAIN_CAMPAIGN == 'hard': + if mode == 'hard': self.campaign_ensure_mode('hard') elif chapter in 'abcd': diff --git a/module/campaign/run.py b/module/campaign/run.py index bd5a73de4..512de54e5 100644 --- a/module/campaign/run.py +++ b/module/campaign/run.py @@ -182,7 +182,7 @@ class CampaignRun(CampaignUI, Reward): def handle_campaign_ui(self): for n in range(20): try: - self.ensure_campaign_ui(name=self.stage) + self.ensure_campaign_ui(name=self.stage, mode=self.config.CAMPAIGN_MODE) self.campaign.ENTRANCE = self.campaign_get_entrance(name=self.stage) return True except CampaignNameError: diff --git a/module/config/argparser_en.py b/module/config/argparser_en.py index 493f854ae..df7ef4eef 100644 --- a/module/config/argparser_en.py +++ b/module/config/argparser_en.py @@ -326,7 +326,7 @@ def main(ini_name=''): # 选择关卡 stage = main_parser.add_argument_group('Choose a level', 'Main campaign, Currently, not all maps are being supported, check the folder /doc/development_en.md to know how add new maps') stage.add_argument('--main_stage', default=default('--main_stage'), help='E.g 7-2') - stage.add_argument('--enable_hard_main_campaign', default=default('--enable_hard_main_campaign'), help='Useful if you want to clear a hard mode map', choices=['normal', 'hard']) + stage.add_argument('--campaign_mode', default=default('--campaign_mode'), help='Useful if you want to clear a hard mode map', choices=['normal', 'hard']) # ==========event========== event_parser = subs.add_parser('event') diff --git a/module/config/config.py b/module/config/config.py index 3ceead282..42a2bff8e 100644 --- a/module/config/config.py +++ b/module/config/config.py @@ -110,7 +110,6 @@ class AzurLaneConfig: """ CAMPAIGN_NAME = 'default' CAMPAIGN_MODE = 'normal' - ENABLE_HARD_MAIN_CAMPAIGN = '' ENABLE_STOP_CONDITION = True ENABLE_FAST_FORWARD = True @@ -482,7 +481,7 @@ class AzurLaneConfig: self.TACTICAL_EXP_FIRST_NIGHT = to_bool(option['tactical_exp_first_night']) option = config['Main'] - self.ENABLE_HARD_MAIN_CAMPAIGN = option['enable_hard_main_campaign'] + self.CAMPAIGN_MODE = option['campaign_mode'] self.CAMPAIGN_NAME = option['main_stage'] self.CAMPAIGN_NAME = 'campaign_' + self.CAMPAIGN_NAME.replace('-', '_') diff --git a/module/config/dictionary.py b/module/config/dictionary.py index 476d2a1ed..ba88bf752 100644 --- a/module/config/dictionary.py +++ b/module/config/dictionary.py @@ -147,7 +147,7 @@ dic_true_eng_to_eng = { 'exercise_equipment': 'exercise_equipment', 'main_stage': 'main_stage', 'event_stage': 'event_stage', - 'enable_hard_main_campaign': 'enable_hard_main_campaign', + 'campaign_mode': 'campaign_mode', 'sp_stage': 'sp_stage', 'event_name': 'event_name', 'event_name_ab': 'event_name_ab', diff --git a/module/reward/commission.py b/module/reward/commission.py index cdeb0b220..d02218816 100644 --- a/module/reward/commission.py +++ b/module/reward/commission.py @@ -36,16 +36,16 @@ dictionary_en = { 'major_comm': ['SelfTraining', 'DefenseExercise', 'ResearchMission', 'Prep', 'Class', 'CargoTransport'], 'daily_comm': ['Daily', 'Awakening'], 'extra_drill': ['Sailing', 'DefensePatrol', 'Buoy', 'saingTraining'], - 'extra_part': ['Protection'], + 'extra_part': ['Protection', 'Forestprtectioncommisionl', 'veinprotectoncommisionl', 'veinprtectioncommision', 'Forestprotectncommisionll', 'veinprotectncommision'], 'extra_cube': ['FleetExercise', 'EscortExercise', 'FleetCargo', 'CombatExercise'], - 'extra_oil': ['oil'], + 'extra_oil': ['oil', 'smallscaleoiExtractionll', 'smal.scaleoiExtractionll'], 'extra_book': ['MerchantEscort'], 'urgent_drill': ['CargoDefense', 'Destroy'], 'urgent_part': ['Lavella', 'Maui', 'Rendova', 'banna', 'Mannelsland'], - 'urgent_book': ['Tyrant', 'Poro', 'Makira', 'Kapolo', 'Mary', 'Isle', 'Kotlin'], + 'urgent_book': ['Tyrant', 'Poro', 'Makira', 'Kapolo', 'Mary', 'Isle', 'Kotlin', 'AidingWapolo'], 'urgent_box': ['Gear', 'Handover'], 'urgent_cube': ['MerchantRescue', 'Attack'], - 'urgent_gem': ['VIP ', 'Holiday', 'PatrolEscort'], + 'urgent_gem': ['VIP ', 'Holiday', 'PatrolEscort', 'BIWWIPEscort', 'BIWVIPEscort'], 'urgent_ship': ['Launch'] } @@ -284,7 +284,7 @@ class CommissionGroup: # Find commission position color_height = np.mean(image.crop( (597, 0, 619, 720)).convert('L'), axis=1) - parameters = {'height': 200} + parameters = {'height': 200, 'distance': 100} peaks, _ = signal.find_peaks(color_height, **parameters) peaks = [y for y in peaks if y > 67 + 117]