Skip to content

Commit d8239f7

Browse files
committed
Improve reliability of PLA region navigation.
1 parent 72b22b6 commit d8239f7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace PokemonAutomation{
2525
const bool IS_BETA_VERSION = true;
2626
const int PROGRAM_VERSION_MAJOR = 0;
2727
const int PROGRAM_VERSION_MINOR = 50;
28-
const int PROGRAM_VERSION_PATCH = 17;
28+
const int PROGRAM_VERSION_PATCH = 18;
2929

3030
const std::string PROGRAM_VERSION_BASE =
3131
"v" + std::to_string(PROGRAM_VERSION_MAJOR) +

SerialPrograms/Source/PokemonLA/Programs/PokemonLA_RegionNavigation.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ void mash_A_to_enter_sub_area(
149149
void mash_A_to_change_region(
150150
ProgramEnvironment& env, ConsoleHandle& console, BotBaseContext& context
151151
){
152+
#if 0
152153
console.log("Waiting for loading screen...");
153154
BlackScreenOverWatcher black_screen0;
154155
int ret = run_until(
@@ -165,13 +166,16 @@ void mash_A_to_change_region(
165166
);
166167
}
167168
context.wait_for(std::chrono::milliseconds(1000));
169+
#endif
168170

169171
console.log("Waiting for end of loading screen...");
170172
BlackScreenOverWatcher black_screen1a(COLOR_RED, {0.20, 0.02, 0.60, 0.05}, 150);
171173
BlackScreenOverWatcher black_screen1b(COLOR_RED, {0.20, 0.93, 0.60, 0.05}, 150);
172-
ret = wait_until(
174+
int ret = run_until(
173175
console, context,
174-
std::chrono::milliseconds(1000 * GameSettings::instance().LOAD_REGION_TIMEOUT / TICKS_PER_SECOND),
176+
[](BotBaseContext& context){
177+
pbf_mash_button(context, BUTTON_A, GameSettings::instance().LOAD_REGION_TIMEOUT);
178+
},
175179
{
176180
{black_screen1a},
177181
{black_screen1b},

0 commit comments

Comments
 (0)