|
14 | 14 | #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" |
15 | 15 | #include "NintendoSwitch/Controllers/Procon/NintendoSwitch_ProController.h" |
16 | 16 | #include "NintendoSwitch/NintendoSwitch_ConsoleHandle.h" |
| 17 | +#include "Pokemon/Pokemon_Strings.h" |
| 18 | +#include "PokemonFRLG/PokemonFRLG_Settings.h" |
17 | 19 | #include "PokemonFRLG/Inference/Dialogs/PokemonFRLG_DialogDetector.h" |
18 | 20 | #include "PokemonFRLG/Inference/Dialogs/PokemonFRLG_BattleDialogs.h" |
19 | 21 | #include "PokemonFRLG/Inference/Sounds/PokemonFRLG_ShinySoundDetector.h" |
20 | 22 | #include "PokemonFRLG/Inference/Menus/PokemonFRLG_StartMenuDetector.h" |
21 | 23 | #include "PokemonFRLG/Inference/Menus/PokemonFRLG_LoadMenuDetector.h" |
22 | 24 | #include "PokemonFRLG/Inference/Menus/PokemonFRLG_SummaryDetector.h" |
23 | | -#include "PokemonFRLG/PokemonFRLG_Settings.h" |
| 25 | +#include "PokemonFRLG/Programs/PokemonFRLG_StartMenuNavigation.h" |
24 | 26 | #include "PokemonFRLG_Navigation.h" |
25 | 27 |
|
26 | 28 | namespace PokemonAutomation{ |
@@ -136,19 +138,18 @@ bool try_open_slot_six(ConsoleHandle& console, ProControllerContext& context){ |
136 | 138 | return false; |
137 | 139 | } |
138 | 140 |
|
| 141 | + if (!move_cursor_to_position(console, context, SelectionArrowPositionStartMenu::POKEMON)){ |
| 142 | + console.log("open_slot_six(): Unable to move menu cursor to: " + Pokemon::STRING_POKEMON, COLOR_RED); |
| 143 | + return false; |
| 144 | + } |
| 145 | + |
139 | 146 | console.log("Navigating to party menu."); |
140 | 147 | BlackScreenOverWatcher blk1(COLOR_RED); |
141 | 148 |
|
142 | 149 | int pm = run_until<ProControllerContext>( |
143 | 150 | console, context, |
144 | 151 | [](ProControllerContext& context){ |
145 | | - pbf_wait(context, 200ms); |
146 | | - context.wait_for_all_requests(); |
147 | | - pbf_press_dpad(context, DPAD_DOWN, 320ms, 320ms); |
148 | | - context.wait_for_all_requests(); |
149 | | - |
150 | | - pbf_press_button(context, BUTTON_A, 320ms, 640ms); |
151 | | - pbf_wait(context, 5000ms); |
| 152 | + pbf_press_button(context, BUTTON_A, 320ms, 5640ms); |
152 | 153 | context.wait_for_all_requests(); |
153 | 154 | }, |
154 | 155 | { blk1 } |
|
0 commit comments