From 2244ca3d8dc99341a056c0b3074b63bdea407f4f Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Wed, 29 Apr 2020 17:45:35 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8D=E9=A2=9D=E5=A4=96?= =?UTF-8?q?=E5=89=A7=E6=83=85=E5=87=BA=E7=8E=B0=E6=97=B6=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/combat/combat.py | 3 +-- module/handler/enemy_searching.py | 5 ++++- module/map/map_operation.py | 7 +++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/module/combat/combat.py b/module/combat/combat.py index 54d5a14a0..c53b6710f 100644 --- a/module/combat/combat.py +++ b/module/combat/combat.py @@ -10,7 +10,6 @@ from module.combat.hp_balancer import HPBalancer from module.combat.submarine import SubmarineCall from module.handler.enemy_searching import EnemySearchingHandler from module.handler.low_emotion import LowEmotionHandler -from module.handler.story import StoryHandler from module.handler.urgent_commission import UrgentCommissionHandler from module.logger import logger from module.map.assets import MAP_OFFENSIVE @@ -19,7 +18,7 @@ from module.ui.assets import BACK_ARROW class Combat(HPBalancer, UrgentCommissionHandler, EnemySearchingHandler, Retirement, SubmarineCall, LowEmotionHandler, - CombatAuto, CombatManual, StoryHandler): + CombatAuto, CombatManual): _automation_set_timer = Timer(1) _emotion: Emotion battle_status_click_interval = 0 diff --git a/module/handler/enemy_searching.py b/module/handler/enemy_searching.py index e2a844bfa..070408398 100644 --- a/module/handler/enemy_searching.py +++ b/module/handler/enemy_searching.py @@ -3,10 +3,11 @@ from module.base.utils import red_overlay_transparency, get_color from module.exception import CampaignEnd from module.handler.assets import * from module.handler.info_bar import InfoBarHandler +from module.handler.story import StoryHandler from module.logger import logger -class EnemySearchingHandler(InfoBarHandler): +class EnemySearchingHandler(InfoBarHandler, StoryHandler): MAP_ENEMY_SEARCHING_OVERLAY_TRANSPARENCY_THRESHOLD = 0.5 # Usually (0.70, 0.80). MAP_ENEMY_SEARCHING_TIMEOUT_SECOND = 4.5 in_stage_timer = Timer(1, count=3) @@ -50,6 +51,8 @@ class EnemySearchingHandler(InfoBarHandler): timeout.start() if self.handle_in_stage(): return True + if self.handle_story_skip(): + timeout.reset() if self.enemy_searching_appear(): appeared = True else: diff --git a/module/map/map_operation.py b/module/map/map_operation.py index ef1c5b5f8..cb666c3c3 100644 --- a/module/map/map_operation.py +++ b/module/map/map_operation.py @@ -1,19 +1,18 @@ from module.base.timer import Timer +from module.exception import CampaignEnd +from module.exception import ScriptEnd from module.handler.fast_forward import FastForwardHandler from module.handler.low_emotion import LowEmotionHandler from module.handler.mystery import MysteryHandler -from module.handler.story import StoryHandler from module.handler.urgent_commission import UrgentCommissionHandler from module.logger import logger from module.map.assets import * -from module.exception import CampaignEnd -from module.exception import ScriptEnd from module.map.map_fleet_preparation import FleetPreparation from module.retire.retirement import Retirement class MapOperation(UrgentCommissionHandler, MysteryHandler, FleetPreparation, Retirement, FastForwardHandler, - LowEmotionHandler, StoryHandler): + LowEmotionHandler): def fleet_switch_click(self): """ Switch fleet.