From af53e304854dcdae93b3443df7205b37f1d0fa60 Mon Sep 17 00:00:00 2001 From: kichithewolf Date: Mon, 25 Mar 2024 12:33:44 -0400 Subject: [PATCH] rename escape_stuck_on_wall --- .../Source/PokemonSV/Programs/PokemonSV_Navigation.cpp | 4 ++-- .../Source/PokemonSV/Programs/PokemonSV_Navigation.h | 3 ++- .../Source/PokemonSV/Programs/PokemonSV_Terarium.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.cpp b/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.cpp index 14c7e11ea..2956bd999 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.cpp @@ -627,7 +627,7 @@ void fly_to_closest_pokecenter_on_map(const ProgramInfo& info, ConsoleHandle& co } } -void escape_stuck_on_wall(const ProgramInfo& info, ConsoleHandle& console, BotBaseContext& context) { +void jump_off_wall_until_map_open(const ProgramInfo& info, ConsoleHandle& console, BotBaseContext& context) { for (auto i = 0; i < 3; i++) { pbf_press_button(context, BUTTON_L, 50, 50); pbf_press_button(context, BUTTON_B, 50, 50); @@ -644,7 +644,7 @@ void escape_stuck_on_wall(const ProgramInfo& info, ConsoleHandle& console, BotBa console.log("Could not escape wall."); throw OperationFailedException( ErrorReport::SEND_ERROR_REPORT, console, - "escape_stuck_on_wall(): Could not escape wall.", + "jump_off_wall_until_map_open(): Could not escape wall.", true ); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.h b/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.h index bab90d746..f66d3355f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.h +++ b/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Navigation.h @@ -69,7 +69,8 @@ void fly_to_closest_pokecenter_on_map(const ProgramInfo& info, ConsoleHandle& co // Attempt to escape being stuck on a wall. // Repeatedly center camera and try to backwards jump off. -void escape_stuck_on_wall(const ProgramInfo& info, ConsoleHandle& console, BotBaseContext& context); +// Finishes when map is successfully open. +void jump_off_wall_until_map_open(const ProgramInfo& info, ConsoleHandle& console, BotBaseContext& context); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Terarium.cpp b/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Terarium.cpp index 2ae25a972..58973ddfc 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Terarium.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/PokemonSV_Terarium.cpp @@ -58,7 +58,7 @@ void return_to_plaza(const ProgramInfo& info, ConsoleHandle& console, BotBaseCon open_map_from_overworld(info, console, context); } catch (...) { - escape_stuck_on_wall(info, console, context); + jump_off_wall_until_map_open(info, console, context); } //Move cursor to top left corner - even works when at Entrance fly point