77#include " CommonFramework/ProgramStats/StatsTracking.h"
88#include " CommonFramework/Notifications/ProgramNotifications.h"
99#include " CommonFramework/VideoPipeline/VideoFeed.h"
10+
1011#include " CommonTools/Async/InferenceRoutines.h"
1112#include " CommonTools/VisualDetectors/BlackScreenDetector.h"
13+
1214#include " NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h"
1315#include " NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h"
16+
1417#include " Pokemon/Pokemon_Strings.h"
1518#include " PokemonFRLG/Inference/Dialogs/PokemonFRLG_DialogDetector.h"
1619#include " PokemonFRLG/Inference/Dialogs/PokemonFRLG_BattleDialogs.h"
1720#include " PokemonFRLG/Inference/PokemonFRLG_SelectionArrowDetector.h"
1821#include " PokemonFRLG/Inference/Sounds/PokemonFRLG_ShinySoundDetector.h"
1922#include " PokemonFRLG/PokemonFRLG_Navigation.h"
20- # include " PokemonFRLG_ShinyHunt-Fishing.h "
23+
2124#include < chrono>
2225
26+ #include " PokemonFRLG_ShinyHunt-Fishing.h"
27+
2328/* TODO LIST
2429 * Based on reading the included .h files, I believe I can add the following functionality in the future.
2530 * -An option to automatically register a new rod.
@@ -35,8 +40,8 @@ namespace PokemonAutomation{
3540namespace NintendoSwitch {
3641namespace PokemonFRLG {
3742
38- PokemonFRLG_ShinyHuntFishing_Descriptor ::
39- PokemonFRLG_ShinyHuntFishing_Descriptor ()
43+ ShinyHuntFishing_Descriptor ::
44+ ShinyHuntFishing_Descriptor ()
4045 : SingleSwitchProgramDescriptor(
4146 " PokemonFRLG:ShinyHuntFishing" ,
4247 Pokemon::STRING_POKEMON + " FRLG" , " Shiny Hunt - Fishing" ,
@@ -48,30 +53,29 @@ PokemonFRLG_ShinyHuntFishing_Descriptor::
4853 )
4954{}
5055
51- struct PokemonFRLG_ShinyHuntFishing_Descriptor ::Stats : public StatsTracker{
56+ struct ShinyHuntFishing_Descriptor ::Stats : public StatsTracker{
5257 Stats ()
5358 : encounters(m_stats[" Encounters" ])
5459 , shinies(m_stats[" Shinies" ])
5560 , errors(m_stats[" Errors" ])
5661 {
5762 m_display_order.emplace_back (" Encounters" );
5863 m_display_order.emplace_back (" Shinies" );
59- m_display_order.emplace_back (" Errors" );
64+ m_display_order.emplace_back (" Errors" , HIDDEN_IF_ZERO );
6065 }
6166
6267 std::atomic<uint64_t >& encounters;
6368 std::atomic<uint64_t >& shinies;
6469 std::atomic<uint64_t >& errors;
6570};
6671
67- std::unique_ptr<StatsTracker> PokemonFRLG_ShinyHuntFishing_Descriptor ::make_stats () const {
72+ std::unique_ptr<StatsTracker> ShinyHuntFishing_Descriptor ::make_stats () const {
6873 return std::make_unique<Stats>();
6974}
7075
7176
72- PokemonFRLG_ShinyHuntFishing::PokemonFRLG_ShinyHuntFishing ()
77+ ShinyHuntFishing::ShinyHuntFishing ()
7378 : SingleSwitchProgramInstance()
74-
7579 , BITE_WAIT_MS(
7680 " <b>Bite Wait (ms)</b><br>"
7781 " Adaptive delay before pressing A." ,
@@ -80,16 +84,18 @@ PokemonFRLG_ShinyHuntFishing::PokemonFRLG_ShinyHuntFishing()
8084 2400 ,
8185 4200
8286 )
83-
8487 , GO_HOME_WHEN_DONE(true )
8588
8689 , NOTIFICATION_SHINY(
8790 " Shiny found" ,
8891 true , true , ImageAttachmentMode::JPG,
8992 {" Notifs" , " Showcase" }
9093 )
94+
95+ , NOTIFICATION_STATUS_UPDATE(" Status Update" , true , false , std::chrono::seconds(3600 ))
9196 , NOTIFICATIONS({
9297 &NOTIFICATION_SHINY,
98+ &NOTIFICATION_STATUS_UPDATE,
9399 &NOTIFICATION_PROGRAM_FINISH
94100 })
95101
@@ -104,15 +110,14 @@ PokemonFRLG_ShinyHuntFishing::PokemonFRLG_ShinyHuntFishing()
104110}
105111
106112
107- void PokemonFRLG_ShinyHuntFishing ::program (SingleSwitchProgramEnvironment& env,ProControllerContext& context
113+ void ShinyHuntFishing ::program (SingleSwitchProgramEnvironment& env,ProControllerContext& context
108114 ){
109- auto & stats = env.current_stats <PokemonFRLG_ShinyHuntFishing_Descriptor ::Stats>();
115+ auto & stats = env.current_stats <ShinyHuntFishing_Descriptor ::Stats>();
110116
111117 home_black_border_check (env.console , context);
112118 /*
113- * Settings: Text Speed fast. Audio required.
119+ * Settings: Text Speed fast.
114120 * Setup: Stand in facing fishable water.
115- * Lead can't be shiny.
116121 */
117122
118123 env.log (" FRLG Fishing shiny hunt started." );
@@ -128,7 +133,7 @@ void PokemonFRLG_ShinyHuntFishing::program(SingleSwitchProgramEnvironment& env,P
128133 while (true ){
129134
130135 // cast rod (must already be registered)
131- pbf_press_button (context, BUTTON_MINUS, 20ms, 400ms );
136+ pbf_press_button (context, BUTTON_MINUS, 20ms, 1400ms );
132137
133138 // wait for bite dialog or battle transition
134139 int ret =
0 commit comments