Skip to content

Commit f6bd9c6

Browse files
committed
Use day night detector instead
1 parent b5bdcba commit f6bd9c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SerialPrograms/Source/PokemonLZA/Programs/ShinyHunting/PokemonLZA_WildZoneEntrance.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "Pokemon/Pokemon_Strings.h"
2020
#include "PokemonLA/Inference/Sounds/PokemonLA_ShinySoundDetector.h"
2121
#include "PokemonLZA/Inference/PokemonLZA_ButtonDetector.h"
22+
#include "PokemonLZA/Inference/PokemonLZA_DayNightChangeDetector.h"
2223
#include "PokemonLZA/Inference/PokemonLZA_OverworldPartySelectionDetector.h"
2324
#include "PokemonLZA/Inference/Map/PokemonLZA_DirectionArrowDetector.h"
2425
#include "PokemonLZA/Programs/PokemonLZA_BasicNavigation.h"
@@ -342,15 +343,15 @@ void leave_zone_and_reset_spawns(
342343
const double starting_angle = get_current_facing_angle(env, context);
343344

344345
ButtonWatcher buttonA(COLOR_RED, ButtonType::ButtonA, {0.3, 0.2, 0.4, 0.7}, &env.console.overlay());
345-
OverworldPartySelectionOverWatcher overworld_gone(COLOR_WHITE, &env.console.overlay(), std::chrono::milliseconds(400));
346+
DayNightChangeWatcher day_night(COLOR_WHITE);
346347
int ret = run_until<ProControllerContext>(
347348
env.console, context,
348349
[&walk_time_in_zone](ProControllerContext& context){
349350
// running back
350351
ssf_press_button(context, BUTTON_B, 0ms, walk_time_in_zone, 0ms);
351352
pbf_move_left_joystick(context, 128, 255, walk_time_in_zone, 0ms);
352353
},
353-
{{buttonA, overworld_gone}}
354+
{{buttonA, day_night}}
354355
);
355356
switch (ret){
356357
case 0:

0 commit comments

Comments
 (0)