Skip to content

Commit

Permalink
Fix critical bug introduced in ball catching refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mysticial committed Sep 27, 2023
1 parent d02ab22 commit 42dc18c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion SerialPrograms/Source/CommonFramework/Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace PokemonAutomation{
const bool IS_BETA_VERSION = true;
const int PROGRAM_VERSION_MAJOR = 0;
const int PROGRAM_VERSION_MINOR = 41;
const int PROGRAM_VERSION_PATCH = 1;
const int PROGRAM_VERSION_PATCH = 2;

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 @@ -108,6 +108,7 @@
#include "Pokemon/Resources/Pokemon_PokemonSlugs.h"
#include "PokemonSV/Inference/PokemonSV_BagDetector.h"
#include <filesystem>
#include "PokemonSwSh/MaxLair/Inference/PokemonSwSh_MaxLair_Detect_Lobby.h"



Expand Down Expand Up @@ -234,6 +235,14 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
BotBaseContext context(scope, console.botbase());
VideoOverlaySet overlays(overlay);


PokemonSwSh::MaxLairInternal::LobbyJoinedDetector detector(2, false);

auto snapshot = console.video().snapshot();
// detector.VisualInferenceCallback::process_frame(snapshot);
detector.joined(snapshot, snapshot.timestamp);


// size_t errors = 0;
// attach_item_from_bag(env.program_info(), console, context, errors);
// attach_item_from_box(env.program_info(), console, context, 1, errors);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,8 @@ CatchResults basic_catcher(
GradientArrowWatcher add_to_party(COLOR_BLUE, GradientArrowType::RIGHT, {0.50, 0.39, 0.30, 0.10});
AdvanceDialogWatcher dialog(COLOR_PURPLE);
context.wait_for_all_requests();
int ret = run_until(
console, context, [](BotBaseContext& context){
pbf_mash_button(context, BUTTON_B, 120 * TICKS_PER_SECOND);
},
int ret = wait_until(
console, context, std::chrono::seconds(120),
{
battle_menu,
overworld,
Expand Down

0 comments on commit 42dc18c

Please sign in to comment.