From 9f12ff800e169a07e801eee93506b9c8eb5f3361 Mon Sep 17 00:00:00 2001 From: NateScarlet Date: Sun, 10 Oct 2021 21:20:26 +0800 Subject: [PATCH] fix(single-mode): wait aoharu countdown animation --- auto_derby/scenes/single_mode/command.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/auto_derby/scenes/single_mode/command.py b/auto_derby/scenes/single_mode/command.py index f0c6d9c0..55764cf9 100644 --- a/auto_derby/scenes/single_mode/command.py +++ b/auto_derby/scenes/single_mode/command.py @@ -89,7 +89,6 @@ def recognize_go_out_options(self, ctx: single_mode.Context) -> None: def recognize(self, ctx: single_mode.Context): action.reset_client_size() - ctx.update_by_command_scene(template.screenshot()) # wait aoharu countdown animation if ctx.scenario == ctx.SCENARIO_AOHARU and ctx.date[1:] in ( (1, 2), @@ -97,7 +96,11 @@ def recognize(self, ctx: single_mode.Context): (7, 2), (10, 1), ): - time.sleep(3) + action.wait_image_stable( + templates.SINGLE_MODE_CHARACTER_DETAIL_BUTTON, + duration=3, + ) + ctx.update_by_command_scene(template.screenshot()) self.recognize_commands(ctx) if not ctx.fan_count: self.recognize_class(ctx)