Skip to content

Commit

Permalink
Improve reliability of PLA region navigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mysticial committed Jan 12, 2025
1 parent 72b22b6 commit d8239f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion SerialPrograms/Source/CommonFramework/Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace PokemonAutomation{
const bool IS_BETA_VERSION = true;
const int PROGRAM_VERSION_MAJOR = 0;
const int PROGRAM_VERSION_MINOR = 50;
const int PROGRAM_VERSION_PATCH = 17;
const int PROGRAM_VERSION_PATCH = 18;

const std::string PROGRAM_VERSION_BASE =
"v" + std::to_string(PROGRAM_VERSION_MAJOR) +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ void mash_A_to_enter_sub_area(
void mash_A_to_change_region(
ProgramEnvironment& env, ConsoleHandle& console, BotBaseContext& context
){
#if 0
console.log("Waiting for loading screen...");
BlackScreenOverWatcher black_screen0;
int ret = run_until(
Expand All @@ -165,13 +166,16 @@ void mash_A_to_change_region(
);
}
context.wait_for(std::chrono::milliseconds(1000));
#endif

console.log("Waiting for end of loading screen...");
BlackScreenOverWatcher black_screen1a(COLOR_RED, {0.20, 0.02, 0.60, 0.05}, 150);
BlackScreenOverWatcher black_screen1b(COLOR_RED, {0.20, 0.93, 0.60, 0.05}, 150);
ret = wait_until(
int ret = run_until(
console, context,
std::chrono::milliseconds(1000 * GameSettings::instance().LOAD_REGION_TIMEOUT / TICKS_PER_SECOND),
[](BotBaseContext& context){
pbf_mash_button(context, BUTTON_A, GameSettings::instance().LOAD_REGION_TIMEOUT);
},
{
{black_screen1a},
{black_screen1b},
Expand Down

0 comments on commit d8239f7

Please sign in to comment.