From 4a697bb29bb4626f6926595e524090ac59309e5c Mon Sep 17 00:00:00 2001 From: jw098 Date: Tue, 25 Aug 2026 12:28:07 -0700 Subject: [PATCH 1/2] add notif_error_recoverable parameter to AutoStoryTools::checkpoint_reattempt_loop. remove one usage of ScreenshotException::send_recoverable_notification --- .../AutoStory/PokemonSV_AutoStory.cpp | 216 +++++++++--------- .../AutoStory/PokemonSV_AutoStoryTools.cpp | 26 ++- .../AutoStory/PokemonSV_AutoStoryTools.h | 10 +- .../PokemonSV_AutoStory_Segment_01.cpp | 17 +- .../PokemonSV_AutoStory_Segment_01.h | 3 + .../PokemonSV_AutoStory_Segment_02.cpp | 5 +- .../PokemonSV_AutoStory_Segment_02.h | 1 + .../PokemonSV_AutoStory_Segment_03.cpp | 15 +- .../PokemonSV_AutoStory_Segment_03.h | 3 + .../PokemonSV_AutoStory_Segment_04.cpp | 5 +- .../PokemonSV_AutoStory_Segment_04.h | 1 + .../PokemonSV_AutoStory_Segment_05.cpp | 10 +- .../PokemonSV_AutoStory_Segment_05.h | 2 + .../PokemonSV_AutoStory_Segment_06.cpp | 5 +- .../PokemonSV_AutoStory_Segment_06.h | 1 + .../PokemonSV_AutoStory_Segment_07.cpp | 5 +- .../PokemonSV_AutoStory_Segment_07.h | 1 + .../PokemonSV_AutoStory_Segment_08.cpp | 15 +- .../PokemonSV_AutoStory_Segment_08.h | 3 + .../PokemonSV_AutoStory_Segment_09.cpp | 25 +- .../PokemonSV_AutoStory_Segment_09.h | 5 + .../PokemonSV_AutoStory_Segment_10.cpp | 15 +- .../PokemonSV_AutoStory_Segment_10.h | 3 + .../PokemonSV_AutoStory_Segment_11.cpp | 20 +- .../PokemonSV_AutoStory_Segment_11.h | 4 + .../PokemonSV_AutoStory_Segment_12.cpp | 5 +- .../PokemonSV_AutoStory_Segment_12.h | 1 + .../PokemonSV_AutoStory_Segment_13.cpp | 5 +- .../PokemonSV_AutoStory_Segment_13.h | 1 + .../PokemonSV_AutoStory_Segment_14.cpp | 10 +- .../PokemonSV_AutoStory_Segment_14.h | 2 + .../PokemonSV_AutoStory_Segment_15.cpp | 15 +- .../PokemonSV_AutoStory_Segment_15.h | 3 + .../PokemonSV_AutoStory_Segment_16.cpp | 10 +- .../PokemonSV_AutoStory_Segment_16.h | 2 + .../PokemonSV_AutoStory_Segment_17.cpp | 10 +- .../PokemonSV_AutoStory_Segment_17.h | 2 + .../PokemonSV_AutoStory_Segment_18.cpp | 10 +- .../PokemonSV_AutoStory_Segment_18.h | 2 + .../PokemonSV_AutoStory_Segment_19.cpp | 10 +- .../PokemonSV_AutoStory_Segment_19.h | 2 + .../PokemonSV_AutoStory_Segment_20.cpp | 20 +- .../PokemonSV_AutoStory_Segment_20.h | 4 + .../PokemonSV_AutoStory_Segment_21.cpp | 15 +- .../PokemonSV_AutoStory_Segment_21.h | 3 + .../PokemonSV_AutoStory_Segment_22.cpp | 20 +- .../PokemonSV_AutoStory_Segment_22.h | 4 + .../PokemonSV_AutoStory_Segment_23.cpp | 5 +- .../PokemonSV_AutoStory_Segment_23.h | 1 + .../PokemonSV_AutoStory_Segment_24.cpp | 15 +- .../PokemonSV_AutoStory_Segment_24.h | 3 + .../PokemonSV_AutoStory_Segment_25.cpp | 15 +- .../PokemonSV_AutoStory_Segment_25.h | 3 + .../PokemonSV_AutoStory_Segment_26.cpp | 15 +- .../PokemonSV_AutoStory_Segment_26.h | 3 + .../PokemonSV_AutoStory_Segment_27.cpp | 24 +- .../PokemonSV_AutoStory_Segment_27.h | 8 +- .../PokemonSV_AutoStory_Segment_28.cpp | 18 +- .../PokemonSV_AutoStory_Segment_28.h | 6 +- .../PokemonSV_AutoStory_Segment_29.cpp | 24 +- .../PokemonSV_AutoStory_Segment_29.h | 8 +- .../PokemonSV_AutoStory_Segment_30.cpp | 18 +- .../PokemonSV_AutoStory_Segment_30.h | 6 +- .../PokemonSV_AutoStory_Segment_31.cpp | 30 +-- .../PokemonSV_AutoStory_Segment_31.h | 10 +- .../PokemonSV_AutoStory_Segment_32.cpp | 12 +- .../PokemonSV_AutoStory_Segment_32.h | 4 +- .../PokemonSV_AutoStory_Segment_33.cpp | 30 +-- .../PokemonSV_AutoStory_Segment_33.h | 10 +- .../PokemonSV_AutoStory_Segment_34.cpp | 18 +- .../PokemonSV_AutoStory_Segment_34.h | 6 +- .../PokemonSV_AutoStory_Segment_35.cpp | 18 +- .../PokemonSV_AutoStory_Segment_35.h | 6 +- .../PokemonSV_AutoStory_Segment_36.cpp | 12 +- .../PokemonSV_AutoStory_Segment_36.h | 4 +- .../PokemonSV_AutoStory_Segment_37.cpp | 12 +- .../PokemonSV_AutoStory_Segment_37.h | 4 +- .../PokemonSV_AutoStory_Segment_38.cpp | 12 +- .../PokemonSV_AutoStory_Segment_38.h | 4 +- .../PokemonSV_AutoStory_Segment_39.cpp | 12 +- .../PokemonSV_AutoStory_Segment_39.h | 4 +- .../PokemonSV_AutoStory_Segment_40.cpp | 10 +- .../PokemonSV_AutoStory_Segment_40.h | 4 +- .../Farming/PokemonSV_ClaimMysteryGift.cpp | 3 +- 84 files changed, 560 insertions(+), 409 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp index 84bb8f648f..1b3ecc148e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp @@ -912,116 +912,117 @@ void AutoStory::test_checkpoints( AutoStoryOptions options{ LANGUAGE, STARTERCHOICE, - NOTIFICATION_STATUS_UPDATE + NOTIFICATION_STATUS_UPDATE, + NOTIFICATION_ERROR_RECOVERABLE }; // std::vector> checkpoint_list; // checkpoint_list.push_back([&](){checkpoint_00(env, context);}); - // checkpoint_list.push_back([&](){checkpoint_01(env, context, notif_status_update, stats, checkpoint_text, language);}); - // checkpoint_list.push_back([&](){checkpoint_02(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_03(env, context, notif_status_update, stats, checkpoint_text, language, starter_choice);}); - // checkpoint_list.push_back([&](){checkpoint_04(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_05(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_06(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_07(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_08(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_09(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_10(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_11(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_12(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_13(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_14(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_15(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_16(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_17(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_18(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_19(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_20(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_21(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_22(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_23(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_24(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_25(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_26(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_27(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_28(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_29(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_30(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_31(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_32(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_33(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_34(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_35(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_36(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_37(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_38(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_39(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_40(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_41(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_42(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_43(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_44(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_45(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_46(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_47(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_48(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_49(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_50(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_51(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_52(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_53(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_54(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_55(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_56(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_57(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_58(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_59(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_60(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_61(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_62(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_63(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_64(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_65(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_66(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_67(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_68(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_69(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_70(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_71(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_72(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_73(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_74(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_75(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_76(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_77(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_78(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_79(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_80(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_81(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_82(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_83(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_84(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_85(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_86(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_87(env, context, notif_status_update, stats, checkpoint_text, language, starter_choice);}); - // checkpoint_list.push_back([&](){checkpoint_88(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_89(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_90(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_91(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_92(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_93(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_94(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_95(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_96(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_97(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_98(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_99(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_100(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_101(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_102(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_103(env, context, notif_status_update, stats);}); - // checkpoint_list.push_back([&](){checkpoint_104(env, context, notif_status_update, stats);}); - // // checkpoint_list.push_back([&](){checkpoint_105(env, context, notif_status_update, stats);}); + // checkpoint_list.push_back([&](){checkpoint_01(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, language);}); + // checkpoint_list.push_back([&](){checkpoint_02(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_03(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, language, starter_choice);}); + // checkpoint_list.push_back([&](){checkpoint_04(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_05(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_06(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_07(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_08(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_09(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_10(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_11(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_12(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_13(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_14(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_15(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_16(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_17(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_18(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_19(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_20(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_21(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_22(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_23(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_24(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_25(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_26(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_27(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_28(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_29(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_30(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_31(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_32(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_33(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_34(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_35(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_36(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_37(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_38(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_39(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_40(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_41(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_42(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_43(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_44(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_45(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_46(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_47(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_48(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_49(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_50(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_51(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_52(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_53(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_54(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_55(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_56(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_57(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_58(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_59(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_60(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_61(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_62(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_63(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_64(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_65(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_66(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_67(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_68(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_69(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_70(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_71(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_72(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_73(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_74(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_75(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_76(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_77(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_78(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_79(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_80(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_81(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_82(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_83(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_84(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_85(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_86(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_87(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, language, starter_choice);}); + // checkpoint_list.push_back([&](){checkpoint_88(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_89(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_90(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_91(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_92(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_93(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_94(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_95(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_96(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_97(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_98(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_99(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_100(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_101(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_102(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_103(env, context, notif_status_update, notif_error_recoverable, stats);}); + // checkpoint_list.push_back([&](){checkpoint_104(env, context, notif_status_update, notif_error_recoverable, stats);}); + // // checkpoint_list.push_back([&](){checkpoint_105(env, context, notif_status_update, notif_error_recoverable, stats);}); if (end == 0){ @@ -1171,7 +1172,8 @@ void AutoStory::run_autostory(SingleSwitchProgramEnvironment& env, ProController AutoStoryOptions options{ LANGUAGE, STARTERCHOICE, - NOTIFICATION_STATUS_UPDATE + NOTIFICATION_STATUS_UPDATE, + NOTIFICATION_ERROR_RECOVERABLE }; AutoStoryStats& stats = env.current_stats(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp index df56d1190f..6666a5f976 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp @@ -5,6 +5,7 @@ */ #include "Common/Cpp/PrettyPrint.h" +#include "CommonFramework/ErrorReports/ErrorReports.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/Exceptions/UnexpectedBattleException.h" #include "CommonFramework/Notifications/ProgramNotifications.h" @@ -463,7 +464,12 @@ void config_option(ProControllerContext& context, int change_option_value){ pbf_press_dpad(context, DPAD_DOWN, 104ms, 160ms); } -void swap_starter_moves(SingleSwitchProgramEnvironment& env, ProControllerContext& context, Language language){ +void swap_starter_moves( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + Language language, + EventNotificationOption& notif_error_recoverable) +{ const ProgramInfo& info = env.program_info(); VideoStream& stream = env.console; @@ -497,12 +503,18 @@ void swap_starter_moves(SingleSwitchProgramEnvironment& env, ProControllerContex stream.log("Current top move: " + top_move); if (top_move != "ember" && top_move != "leafage" && top_move != "water-gun"){ stream.log("Unable to confirm that the moves actually swapped."); - OperationFailedException exception( - ErrorReport::SEND_ERROR_REPORT, - "swap_starter_moves: Unable to confirm that the moves actually swapped.\n" + language_warning(language), - stream + + auto snapshot = stream.video().snapshot().frame; + std::string message = "swap_starter_moves: Unable to confirm that the moves actually swapped.\n" + language_warning(language); + send_program_recoverable_error_notification(env, notif_error_recoverable, message, *snapshot); + report_error( + &env.logger(), + env.program_info(), + "Recoverable: OperationFailedExceptionWithScreenshot", + {{"Message:", message}}, + *snapshot, + &stream.history() ); - exception.send_recoverable_notification(env); } } @@ -1416,6 +1428,7 @@ void checkpoint_reattempt_loop( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, std::function&& action, @@ -1475,6 +1488,7 @@ void checkpoint_reattempt_loop_tutorial( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, std::function&& action diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h index 67a3e766ce..95f70fecdc 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h @@ -90,6 +90,7 @@ struct AutoStoryOptions{ Language language; StarterChoice starter_choice; EventNotificationOption& notif_status_update; + EventNotificationOption& notif_error_recoverable; }; class AutoStory_Segment { @@ -183,7 +184,12 @@ void overworld_navigation(const ProgramInfo& info, VideoStream& stream, ProContr void config_option(ProControllerContext& context, int change_option_value); // enter menu and swap the first and third moves for your starter -void swap_starter_moves(SingleSwitchProgramEnvironment& env, ProControllerContext& context, Language language); +void swap_starter_moves( + SingleSwitchProgramEnvironment& env, + ProControllerContext& context, + Language language, + EventNotificationOption& notif_error_recoverable +); // confirm the moves for the Lead pokemon: Moonblast, Mystical Fire, Psychic, Misty Terrain // start and end in the overworld @@ -379,6 +385,7 @@ void checkpoint_reattempt_loop( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, std::function&& action, @@ -389,6 +396,7 @@ void checkpoint_reattempt_loop_tutorial( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, std::function&& action diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp index 62c7326427..b823d2e12f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp @@ -71,21 +71,21 @@ std::string AutoStory_Checkpoint_01::name() const{ return "001 - " + AutoStory_S std::string AutoStory_Checkpoint_01::start_text() const{ return "Done cutscene. Stood up from chair. Walked to left side of room.";} std::string AutoStory_Checkpoint_01::end_text() const{ return "Standing in room. Updated settings";} void AutoStory_Checkpoint_01::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_01(env, context, options.notif_status_update, stats, checkpoint_text(), options.language); + checkpoint_01(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text(), options.language); } std::string AutoStory_Checkpoint_02::name() const{ return "002 - " + AutoStory_Segment_01().name(); } std::string AutoStory_Checkpoint_02::start_text() const{ return AutoStory_Checkpoint_01().end_text();} std::string AutoStory_Checkpoint_02::end_text() const{ return "Standing in front of the 'power of science' NPC. Cleared map tutorial.";} void AutoStory_Checkpoint_02::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_02(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_02(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_03::name() const{ return "003 - " + AutoStory_Segment_01().name(); } std::string AutoStory_Checkpoint_03::start_text() const{ return AutoStory_Checkpoint_02().end_text();} std::string AutoStory_Checkpoint_03::end_text() const{ return "Received starter Pokemon. Changed move order. Cleared autoheal tutorial.";} void AutoStory_Checkpoint_03::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_03(env, context, options.notif_status_update, stats, checkpoint_text(), options.language, options.starter_choice); + checkpoint_03(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text(), options.language, options.starter_choice); } @@ -93,11 +93,12 @@ void checkpoint_01( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, Language language ){ - checkpoint_reattempt_loop_tutorial(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop_tutorial(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -114,10 +115,11 @@ void checkpoint_02( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop_tutorial(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop_tutorial(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -189,12 +191,13 @@ void checkpoint_03( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, Language language, StarterChoice starter_choice ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -260,7 +263,7 @@ void checkpoint_03( clear_tutorial(env.console, context); env.console.log("Change move order."); - swap_starter_moves(env, context, language); + swap_starter_moves(env, context, language, notif_error_recoverable); press_Bs_to_back_to_overworld(env.program_info(), env.console, context); }, false); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.h index ea5fc4dd98..7ce07cfb9e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.h @@ -57,6 +57,7 @@ void checkpoint_01( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, Language language @@ -68,6 +69,7 @@ void checkpoint_02( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -78,6 +80,7 @@ void checkpoint_03( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, Language language, diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp index 0289a78ec8..a98c3199b4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp @@ -65,7 +65,7 @@ std::string AutoStory_Checkpoint_04::name() const{ return "004 - " + AutoStory_S std::string AutoStory_Checkpoint_04::start_text() const{ return "Received starter Pokemon. Changed move order. Cleared autoheal tutorial.";} std::string AutoStory_Checkpoint_04::end_text() const{ return "Battled Nemona on the beach.";} void AutoStory_Checkpoint_04::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_04(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_04(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -73,10 +73,11 @@ void checkpoint_04( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.h index 067b6dc735..40ff7ea511 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.h @@ -41,6 +41,7 @@ void checkpoint_04( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp index 0ea90e63ba..997593bd01 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp @@ -61,31 +61,32 @@ std::string AutoStory_Checkpoint_05::name() const{ return "005 - " + AutoStory_S std::string AutoStory_Checkpoint_05::start_text() const{ return "Battled Nemona on the beach.";} std::string AutoStory_Checkpoint_05::end_text() const{ return "Met mom at gate. Received mom's sandwich.";} void AutoStory_Checkpoint_05::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_05(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_05(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_06::name() const{ return "006 - " + AutoStory_Segment_03().name(); } std::string AutoStory_Checkpoint_06::start_text() const{ return AutoStory_Checkpoint_05().end_text();} std::string AutoStory_Checkpoint_06::end_text() const{ return "Cleared catch tutorial.";} void AutoStory_Checkpoint_06::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_06(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_06(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_07::name() const{ return "007 - " + AutoStory_Segment_03().name(); } std::string AutoStory_Checkpoint_07::start_text() const{ return AutoStory_Checkpoint_06().end_text();} std::string AutoStory_Checkpoint_07::end_text() const{ return "Moved to cliff. Heard mystery cry. Standing in front of Nemona near the cliff.";} void AutoStory_Checkpoint_07::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_07(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_07(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } void checkpoint_05( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -107,10 +108,11 @@ void checkpoint_06( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -146,10 +148,11 @@ void checkpoint_07( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.h index 6870f79e34..1001cbafea 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.h @@ -56,6 +56,7 @@ void checkpoint_05( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -66,6 +67,7 @@ void checkpoint_06( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -76,6 +78,7 @@ void checkpoint_07( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp index 8352a1df20..2fce30575e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp @@ -65,7 +65,7 @@ std::string AutoStory_Checkpoint_08::name() const{ return "008 - " + AutoStory_S std::string AutoStory_Checkpoint_08::start_text() const{ return "Moved to cliff. Heard mystery cry. Standing in front of Nemona near the cliff.";} std::string AutoStory_Checkpoint_08::end_text() const{ return "Rescued Koraidon/Miraidon and escaped from the Houndoom Cave. Standing next to Koraidon/Miraidon just outside the cave exit.";} void AutoStory_Checkpoint_08::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_08(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_08(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -74,10 +74,11 @@ void checkpoint_08( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.h index 0915d83142..66f74d29a9 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.h @@ -40,6 +40,7 @@ void checkpoint_08( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp index 977265bb92..63d73e42ce 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp @@ -65,7 +65,7 @@ std::string AutoStory_Checkpoint_09::name() const{ return "009 - " + AutoStory_S std::string AutoStory_Checkpoint_09::start_text() const{ return "Rescued Koraidon/Miraidon and escaped from the Houndoom Cave. Standing next to Koraidon/Miraidon just outside the cave exit.";} std::string AutoStory_Checkpoint_09::end_text() const{ return "Battled Arven and received Legendary's Pokeball.";} void AutoStory_Checkpoint_09::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_09(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_09(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -73,7 +73,7 @@ std::string AutoStory_Checkpoint_10::name() const{ return "010 - " + AutoStory_S std::string AutoStory_Checkpoint_10::start_text() const{ return AutoStory_Checkpoint_09().end_text();} std::string AutoStory_Checkpoint_10::end_text() const{ return "Talked to Nemona at roof of the Lighthouse.";} void AutoStory_Checkpoint_10::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_10(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_10(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -82,10 +82,11 @@ void checkpoint_09( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -122,10 +123,11 @@ void checkpoint_10( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.h index 3a91070a79..3bbaf7cffe 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.h @@ -48,6 +48,7 @@ void checkpoint_09( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -58,6 +59,7 @@ void checkpoint_10( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp index 3a3e66f48b..45498be48e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp @@ -63,7 +63,7 @@ std::string AutoStory_Checkpoint_11::name() const{ return "011 - " + AutoStory_S std::string AutoStory_Checkpoint_11::start_text() const{ return "Talked to Nemona at roof of the Lighthouse.";} std::string AutoStory_Checkpoint_11::end_text() const{ return "Arrived at Los Platos pokecenter. Cleared Let's go tutorial.";} void AutoStory_Checkpoint_11::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_11(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_11(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -72,10 +72,11 @@ void checkpoint_11( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.h index 45a3c67d5c..d1767528d1 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.h @@ -41,6 +41,7 @@ void checkpoint_11( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp index e26436134c..798eaf716c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp @@ -64,7 +64,7 @@ std::string AutoStory_Checkpoint_12::name() const{ return "012 - " + AutoStory_S std::string AutoStory_Checkpoint_12::start_text() const{ return "Arrived at Los Platos pokecenter. Cleared Let's go tutorial.";} std::string AutoStory_Checkpoint_12::end_text() const{ return "Arrived at Mesagoza (South) Pokecenter.";} void AutoStory_Checkpoint_12::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_12(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_12(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -73,6 +73,7 @@ void checkpoint_12( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ @@ -80,7 +81,7 @@ void checkpoint_12( // resets due to: getting attacked by wild pokemon, either from behind, // or when lead pokemon not strong enough to clear them with Let's go - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ fly_to_overlapping_flypoint(env.program_info(), env.console, context); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.h index dbe2aab2ba..68a48c1d1d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.h @@ -41,6 +41,7 @@ void checkpoint_12( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp index 622e33ce8d..cfee6d2e06 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp @@ -64,7 +64,7 @@ std::string AutoStory_Checkpoint_13::name() const{ return "013 - " + AutoStory_S std::string AutoStory_Checkpoint_13::start_text() const{ return "Arrived at Mesagoza (South) Pokecenter.";} std::string AutoStory_Checkpoint_13::end_text() const{ return "Battled Nemona at Mesagoza gate. Entered Mesagoza.";} void AutoStory_Checkpoint_13::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_13(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_13(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -73,7 +73,7 @@ std::string AutoStory_Checkpoint_14::name() const{ return "014 - " + AutoStory_S std::string AutoStory_Checkpoint_14::start_text() const{ return AutoStory_Checkpoint_13().end_text();} std::string AutoStory_Checkpoint_14::end_text() const{ return "Battled Team Star at school entrance.";} void AutoStory_Checkpoint_14::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_14(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_14(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -82,7 +82,7 @@ std::string AutoStory_Checkpoint_15::name() const{ return "015 - " + AutoStory_S std::string AutoStory_Checkpoint_15::start_text() const{ return AutoStory_Checkpoint_14().end_text();} std::string AutoStory_Checkpoint_15::end_text() const{ return "Talked to Jacq in classroom. Standing in classroom.";} void AutoStory_Checkpoint_15::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_15(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_15(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -91,12 +91,13 @@ void checkpoint_13( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ // reset rate: 0%. 0 resets out of 70. - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ do_action_and_monitor_for_battles(env.program_info(), env.console, context, [&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ @@ -130,11 +131,12 @@ void checkpoint_14( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -178,11 +180,12 @@ void checkpoint_15( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.h index 936b7b37af..0a3086c72f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.h @@ -56,6 +56,7 @@ void checkpoint_13( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -66,6 +67,7 @@ void checkpoint_14( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -76,6 +78,7 @@ void checkpoint_15( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp index cf1bf87e93..09c9d07281 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp @@ -66,7 +66,7 @@ std::string AutoStory_Checkpoint_16::name() const{ return "016 - " + AutoStory_S std::string AutoStory_Checkpoint_16::start_text() const{ return "Talked to Jacq in classroom. Standing in classroom.";} std::string AutoStory_Checkpoint_16::end_text() const{ return "Talked to Arven. Received Titan questline (Path of Legends). Talked to Cassiopeia. Standing in main hall.";} void AutoStory_Checkpoint_16::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_16(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_16(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -74,28 +74,28 @@ std::string AutoStory_Checkpoint_17::name() const{ return "017 - " + AutoStory_S std::string AutoStory_Checkpoint_17::start_text() const{ return AutoStory_Checkpoint_16().end_text();} std::string AutoStory_Checkpoint_17::end_text() const{ return "Talked to Cassiopeia. Saw Geeta. Talked to Nemona. Received Gym/Elite Four questline (Victory Road). Standing in staff room.";} void AutoStory_Checkpoint_17::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_17(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_17(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_18::name() const{ return "018 - " + AutoStory_Segment_09().name(); } std::string AutoStory_Checkpoint_18::start_text() const{ return AutoStory_Checkpoint_17().end_text();} std::string AutoStory_Checkpoint_18::end_text() const{ return "Talked to Clavell and the professor.";} void AutoStory_Checkpoint_18::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_18(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_18(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_19::name() const{ return "019 - " + AutoStory_Segment_09().name(); } std::string AutoStory_Checkpoint_19::start_text() const{ return AutoStory_Checkpoint_18().end_text();} std::string AutoStory_Checkpoint_19::end_text() const{ return "Talked to Nemona, visited dorm, time passed.";} void AutoStory_Checkpoint_19::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_19(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_19(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_20::name() const{ return "020 - " + AutoStory_Segment_09().name(); } std::string AutoStory_Checkpoint_20::start_text() const{ return AutoStory_Checkpoint_19().end_text();} std::string AutoStory_Checkpoint_20::end_text() const{ return "Get on ride for first time.";} void AutoStory_Checkpoint_20::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_20(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_20(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -105,11 +105,12 @@ void checkpoint_16( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -148,11 +149,12 @@ void checkpoint_17( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -193,11 +195,12 @@ void checkpoint_18( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -230,11 +233,12 @@ void checkpoint_19( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -265,11 +269,12 @@ void checkpoint_20( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.h index 3b98cb2730..986c701e0a 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.h @@ -74,6 +74,7 @@ void checkpoint_16( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -84,6 +85,7 @@ void checkpoint_17( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -94,6 +96,7 @@ void checkpoint_18( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -104,6 +107,7 @@ void checkpoint_19( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -114,6 +118,7 @@ void checkpoint_20( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp index 39ed307dfd..4fe204abbf 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp @@ -67,21 +67,21 @@ std::string AutoStory_Checkpoint_21::name() const{ return "021 - " + AutoStory_S std::string AutoStory_Checkpoint_21::start_text() const{ return "After the break, with level 100 Gardevoir. At Mesagoza West pokecenter.";} std::string AutoStory_Checkpoint_21::end_text() const{ return "At Mesagoza West gate flypoint.";} void AutoStory_Checkpoint_21::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_21(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_21(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_22::name() const{ return "022 - " + AutoStory_Segment_10().name(); } std::string AutoStory_Checkpoint_22::start_text() const{ return AutoStory_Checkpoint_21().end_text();} std::string AutoStory_Checkpoint_22::end_text() const{ return "At South Province Area Two Pokecenter.";} void AutoStory_Checkpoint_22::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_22(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_22(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_23::name() const{ return "023 - " + AutoStory_Segment_10().name(); } std::string AutoStory_Checkpoint_23::start_text() const{ return AutoStory_Checkpoint_22().end_text();} std::string AutoStory_Checkpoint_23::end_text() const{ return "At Cortondo East Pokecenter";} void AutoStory_Checkpoint_23::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_23(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_23(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -90,11 +90,12 @@ void checkpoint_21( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ fly_to_overlapping_flypoint(env.program_info(), env.console, context); @@ -145,11 +146,12 @@ void checkpoint_22( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -208,11 +210,12 @@ void checkpoint_23( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.h index ede7c33e13..8435ecf939 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.h @@ -59,6 +59,7 @@ void checkpoint_21( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -69,6 +70,7 @@ void checkpoint_22( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -79,6 +81,7 @@ void checkpoint_23( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp index 10ef7b93cf..a0a772ad19 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp @@ -78,28 +78,28 @@ std::string AutoStory_Checkpoint_24::name() const{ return "024 - " + AutoStory_S std::string AutoStory_Checkpoint_24::start_text() const{ return "At Cortondo East Pokecenter";} std::string AutoStory_Checkpoint_24::end_text() const{ return "Spoke to Cortondo Gym reception. At Cortondo West Pokecenter.";} void AutoStory_Checkpoint_24::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_24(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_24(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_25::name() const{ return "025 - " + AutoStory_Segment_11().name(); } std::string AutoStory_Checkpoint_25::start_text() const{ return AutoStory_Checkpoint_24().end_text();} std::string AutoStory_Checkpoint_25::end_text() const{ return "Defeated the trainers at Olive Roll, but left Olive unmoved. Then backed out, standing in front of the Olive Roll NPC.";} void AutoStory_Checkpoint_25::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_25(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_25(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_26::name() const{ return "026 - " + AutoStory_Segment_11().name(); } std::string AutoStory_Checkpoint_26::start_text() const{ return AutoStory_Checkpoint_25().end_text();} std::string AutoStory_Checkpoint_26::end_text() const{ return "Completed Olive roll gym challenge.";} void AutoStory_Checkpoint_26::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_26(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_26(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_27::name() const{ return "027 - " + AutoStory_Segment_11().name(); } std::string AutoStory_Checkpoint_27::start_text() const{ return AutoStory_Checkpoint_26().end_text();} std::string AutoStory_Checkpoint_27::end_text() const{ return "At Cortondo East Pokecenter.";} void AutoStory_Checkpoint_27::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_27(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_27(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -108,11 +108,12 @@ void checkpoint_24( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); DirectionDetector direction; @@ -169,11 +170,12 @@ void checkpoint_25( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -250,11 +252,12 @@ void checkpoint_26( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -614,11 +617,12 @@ void checkpoint_27( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, +1, 0, 320ms}); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.h index 90ec196291..7b4ba590d0 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.h @@ -66,6 +66,7 @@ void checkpoint_24( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -76,6 +77,7 @@ void checkpoint_25( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -86,6 +88,7 @@ void checkpoint_26( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -96,6 +99,7 @@ void checkpoint_27( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp index 3b11fbf2b1..3f85762be9 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_28::name() const{ return "028 - " + AutoStory_S std::string AutoStory_Checkpoint_28::start_text() const{ return "At Cortondo East Pokecenter.";} std::string AutoStory_Checkpoint_28::end_text() const{ return "Beat Cortondo Gym. At Cortondo West Pokecenter.";} void AutoStory_Checkpoint_28::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_28(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_28(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -78,11 +78,12 @@ void checkpoint_28( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); DirectionDetector direction; diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.h index ed5b263c42..d71e3aea9b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.h @@ -42,6 +42,7 @@ void checkpoint_28( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp index bb64e01e08..ddd02e7266 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp @@ -63,18 +63,19 @@ std::string AutoStory_Checkpoint_29::name() const{ return "029 - " + AutoStory_S std::string AutoStory_Checkpoint_29::start_text() const{ return "At Cortondo West Pokecenter.";} std::string AutoStory_Checkpoint_29::end_text() const{ return "At West Province Area One Central Pokecenter.";} void AutoStory_Checkpoint_29::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_29(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_29(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } void checkpoint_29( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.h index 584e259e8a..df7a722de7 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.h @@ -42,6 +42,7 @@ void checkpoint_29( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp index ea990bf4ac..4e8d66f335 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp @@ -65,25 +65,26 @@ std::string AutoStory_Checkpoint_30::name() const{ return "030 - " + AutoStory_S std::string AutoStory_Checkpoint_30::start_text() const{ return "At West Province Area One Central Pokecenter.";} std::string AutoStory_Checkpoint_30::end_text() const{ return "Defeated Bombirdier.";} void AutoStory_Checkpoint_30::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_30(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_30(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_31::name() const{ return "031 - " + AutoStory_Segment_14().name(); } std::string AutoStory_Checkpoint_31::start_text() const{ return AutoStory_Checkpoint_30().end_text();} std::string AutoStory_Checkpoint_31::end_text() const{ return "At West Province Area One North Pokecenter.";} void AutoStory_Checkpoint_31::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_31(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_31(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } void checkpoint_30( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ if (attempt_number > 0 || ENABLE_TEST){ @@ -263,11 +264,12 @@ void checkpoint_31( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); // section 1. fall down the mountain diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.h index d11b95dbdc..28de8ff19f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.h @@ -50,6 +50,7 @@ void checkpoint_30( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -60,6 +61,7 @@ void checkpoint_31( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp index d6c9225c28..d7d83c5712 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp @@ -72,21 +72,21 @@ std::string AutoStory_Checkpoint_32::name() const{ return "032 - " + AutoStory_S std::string AutoStory_Checkpoint_32::start_text() const{ return "At West Province Area One North Pokecenter";} std::string AutoStory_Checkpoint_32::end_text() const{ return "At West Province Area One North Pokecenter";} void AutoStory_Checkpoint_32::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_32(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_32(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_33::name() const{ return "033 - " + AutoStory_Segment_15().name(); } std::string AutoStory_Checkpoint_33::start_text() const{ return AutoStory_Checkpoint_32().end_text();} std::string AutoStory_Checkpoint_33::end_text() const{ return "Defeated Team Star (Dark) boss";} void AutoStory_Checkpoint_33::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_33(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_33(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_34::name() const{ return "034 - " + AutoStory_Segment_15().name(); } std::string AutoStory_Checkpoint_34::start_text() const{ return AutoStory_Checkpoint_33().end_text();} std::string AutoStory_Checkpoint_34::end_text() const{ return "At Cascarrafa (West) Pokecenter.";} void AutoStory_Checkpoint_34::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_34(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_34(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -94,11 +94,12 @@ void checkpoint_32( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering @@ -110,11 +111,12 @@ void checkpoint_33( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -289,11 +291,12 @@ void checkpoint_34( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.h index e807f0938b..76129d83b2 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.h @@ -58,6 +58,7 @@ void checkpoint_32( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -68,6 +69,7 @@ void checkpoint_33( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -78,6 +80,7 @@ void checkpoint_34( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp index c7f9ea25e9..8deb070c42 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp @@ -67,25 +67,26 @@ std::string AutoStory_Checkpoint_35::name() const{ return "035 - " + AutoStory_S std::string AutoStory_Checkpoint_35::start_text() const{ return "At Cascarrafa (West) Pokecenter.";} std::string AutoStory_Checkpoint_35::end_text() const{ return "Outside Cascarrafa Gym. Received Kofu's wallet.";} void AutoStory_Checkpoint_35::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_35(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_35(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_36::name() const{ return "036 - " + AutoStory_Segment_16().name(); } std::string AutoStory_Checkpoint_36::start_text() const{ return AutoStory_Checkpoint_35().end_text();} std::string AutoStory_Checkpoint_36::end_text() const{ return "At Porto Marinada Pokecenter.";} void AutoStory_Checkpoint_36::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_36(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_36(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } void checkpoint_35( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); DirectionDetector direction; @@ -127,11 +128,12 @@ void checkpoint_36( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.h index 513371de36..3879e72c57 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.h @@ -50,6 +50,7 @@ void checkpoint_35( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -60,6 +61,7 @@ void checkpoint_36( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp index 7696cb1f8c..ebdad9cc3c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp @@ -67,25 +67,26 @@ std::string AutoStory_Checkpoint_37::name() const{ return "037 - " + AutoStory_S std::string AutoStory_Checkpoint_37::start_text() const{ return "At Porto Marinada Pokecenter.";} std::string AutoStory_Checkpoint_37::end_text() const{ return "Won auction at Porto Marinada, passed Gym challenge.";} void AutoStory_Checkpoint_37::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_37(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_37(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_38::name() const{ return "038 - " + AutoStory_Segment_17().name(); } std::string AutoStory_Checkpoint_38::start_text() const{ return AutoStory_Checkpoint_37().end_text();} std::string AutoStory_Checkpoint_38::end_text() const{ return "Defeat Cascarrafa Gym. At Porto Marinada Pokecenter.";} void AutoStory_Checkpoint_38::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_38(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_38(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } void checkpoint_37( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); DirectionDetector direction; @@ -130,11 +131,12 @@ void checkpoint_38( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, +1, -0.409, 1360ms}); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.h index c72e758e26..6016b2ebbd 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.h @@ -50,6 +50,7 @@ void checkpoint_37( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -60,6 +61,7 @@ void checkpoint_38( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp index 8255d7227e..7991897ef4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp @@ -66,14 +66,14 @@ std::string AutoStory_Checkpoint_39::name() const{ return "039 - " + AutoStory_S std::string AutoStory_Checkpoint_39::start_text() const{ return "Defeated Cascarrafa Gym (Water). At Porto Marinada Pokecenter.";} std::string AutoStory_Checkpoint_39::end_text() const{ return "Defeated Great Tusk/Iron Treads.";} void AutoStory_Checkpoint_39::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_39(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_39(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_40::name() const{ return "040 - " + AutoStory_Segment_18().name(); } std::string AutoStory_Checkpoint_40::start_text() const{ return AutoStory_Checkpoint_39().end_text();} std::string AutoStory_Checkpoint_40::end_text() const{ return "At South Province (Area Three) Pokecenter.";} void AutoStory_Checkpoint_40::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_40(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_40(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -83,11 +83,12 @@ void checkpoint_39( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -252,11 +253,12 @@ void checkpoint_40( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); // fly to Mesagoza East from Great Tusk/Iron Treads diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.h index e7797cb8f0..0d293da7c5 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.h @@ -50,6 +50,7 @@ void checkpoint_39( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -60,6 +61,7 @@ void checkpoint_40( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp index cd252ce994..9966d394ed 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp @@ -67,14 +67,14 @@ std::string AutoStory_Checkpoint_41::name() const{ return "041 - " + AutoStory_S std::string AutoStory_Checkpoint_41::start_text() const{ return "At South Province (Area Three) Pokecenter.";} std::string AutoStory_Checkpoint_41::end_text() const{ return "Defeated Klawf.";} void AutoStory_Checkpoint_41::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_41(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_41(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_42::name() const{ return "042 - " + AutoStory_Segment_19().name(); } std::string AutoStory_Checkpoint_42::start_text() const{ return AutoStory_Checkpoint_41().end_text();} std::string AutoStory_Checkpoint_42::end_text() const{ return "Defeated Klawf. At Artazon (West) Pokecenter.";} void AutoStory_Checkpoint_42::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_42(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_42(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -85,11 +85,12 @@ void checkpoint_41( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -294,11 +295,12 @@ void checkpoint_42( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.h index 518e65785e..80bcad9f79 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.h @@ -50,6 +50,7 @@ void checkpoint_41( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -60,6 +61,7 @@ void checkpoint_42( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp index edf3a0dd5d..3c9287bc94 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp @@ -71,28 +71,28 @@ std::string AutoStory_Checkpoint_43::name() const{ return "043 - " + AutoStory_S std::string AutoStory_Checkpoint_43::start_text() const{ return "Defeated Klawf. At Artazon (West) Pokecenter.";} std::string AutoStory_Checkpoint_43::end_text() const{ return "Battled Nemona. Inside Artazon Gym building.";} void AutoStory_Checkpoint_43::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_43(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_43(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_44::name() const{ return "044 - " + AutoStory_Segment_20().name(); } std::string AutoStory_Checkpoint_44::start_text() const{ return AutoStory_Checkpoint_43().end_text();} std::string AutoStory_Checkpoint_44::end_text() const{ return "Finished Sunflora gym challenge.";} void AutoStory_Checkpoint_44::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_44(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_44(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_45::name() const{ return "045 - " + AutoStory_Segment_20().name(); } std::string AutoStory_Checkpoint_45::start_text() const{ return AutoStory_Checkpoint_44().end_text();} std::string AutoStory_Checkpoint_45::end_text() const{ return "Defeated Artazon Gym (Grass). Inside gym building.";} void AutoStory_Checkpoint_45::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_45(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_45(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_46::name() const{ return "046 - " + AutoStory_Segment_20().name(); } std::string AutoStory_Checkpoint_46::start_text() const{ return AutoStory_Checkpoint_45().end_text();} std::string AutoStory_Checkpoint_46::end_text() const{ return "At East Province (Area One) Pokecenter.";} void AutoStory_Checkpoint_46::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_46(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_46(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -102,11 +102,12 @@ void checkpoint_43( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -170,11 +171,12 @@ void checkpoint_44( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -499,11 +501,12 @@ void checkpoint_45( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -548,11 +551,12 @@ void checkpoint_46( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.h index eaa961ace8..dcd18fdf21 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.h @@ -65,6 +65,7 @@ void checkpoint_43( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -75,6 +76,7 @@ void checkpoint_44( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -85,6 +87,7 @@ void checkpoint_45( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -95,6 +98,7 @@ void checkpoint_46( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp index 95815bcda4..ba06d7dd10 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp @@ -67,21 +67,21 @@ std::string AutoStory_Checkpoint_47::name() const{ return "047 - " + AutoStory_S std::string AutoStory_Checkpoint_47::start_text() const{ return "At East Province (Area One) Pokecenter.";} std::string AutoStory_Checkpoint_47::end_text() const{ return "At East Province (Area One) Pokecenter.";} void AutoStory_Checkpoint_47::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_47(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_47(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_48::name() const{ return "048 - " + AutoStory_Segment_21().name(); } std::string AutoStory_Checkpoint_48::start_text() const{ return AutoStory_Checkpoint_47().end_text();} std::string AutoStory_Checkpoint_48::end_text() const{ return "Beat Team Star (Fire)";} void AutoStory_Checkpoint_48::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_48(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_48(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_49::name() const{ return "049 - " + AutoStory_Segment_21().name(); } std::string AutoStory_Checkpoint_49::start_text() const{ return AutoStory_Checkpoint_48().end_text();} std::string AutoStory_Checkpoint_49::end_text() const{ return "At East Province (Area Two) Pokecenter.";} void AutoStory_Checkpoint_49::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_49(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_49(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -90,11 +90,12 @@ void checkpoint_47( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering @@ -107,11 +108,12 @@ void checkpoint_48( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -294,11 +296,12 @@ void checkpoint_49( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // the landmark Pokecenter is far enough away from current location, that the map Pokemon don't cover it. diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.h index 9bc303ccfe..9c559510b1 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.h @@ -58,6 +58,7 @@ void checkpoint_47( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -68,6 +69,7 @@ void checkpoint_48( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -78,6 +80,7 @@ void checkpoint_49( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp index 4faa342ec0..dc9e9cbc9d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp @@ -69,14 +69,14 @@ std::string AutoStory_Checkpoint_50::name() const{ return "050 - " + AutoStory_S std::string AutoStory_Checkpoint_50::start_text() const{ return "Defeated Team Star (Fire). At East Province (Area Two) Pokecenter.";} std::string AutoStory_Checkpoint_50::end_text() const{ return "At Levincia (South) Pokecenter.";} void AutoStory_Checkpoint_50::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_50(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_50(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_51::name() const{ return "051 - " + AutoStory_Segment_22().name(); } std::string AutoStory_Checkpoint_51::start_text() const{ return AutoStory_Checkpoint_50().end_text();} std::string AutoStory_Checkpoint_51::end_text() const{ return "Inside Levincia gym building. Talked to Hassel, met Rika.";} void AutoStory_Checkpoint_51::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_51(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_51(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -84,7 +84,7 @@ std::string AutoStory_Checkpoint_52::name() const{ return "052 - " + AutoStory_S std::string AutoStory_Checkpoint_52::start_text() const{ return AutoStory_Checkpoint_51().end_text();} std::string AutoStory_Checkpoint_52::end_text() const{ return "Finished Levincia gym challenge. Outside Levincia gym building.";} void AutoStory_Checkpoint_52::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_52(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_52(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -92,7 +92,7 @@ std::string AutoStory_Checkpoint_53::name() const{ return "053 - " + AutoStory_S std::string AutoStory_Checkpoint_53::start_text() const{ return AutoStory_Checkpoint_52().end_text();} std::string AutoStory_Checkpoint_53::end_text() const{ return "Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";} void AutoStory_Checkpoint_53::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_53(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_53(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -101,10 +101,11 @@ void checkpoint_50( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -188,10 +189,11 @@ void checkpoint_51( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -223,10 +225,11 @@ void checkpoint_52( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // talk to receptionist env.console.log("Talk to Levincia gym receptionist."); @@ -357,10 +360,11 @@ void checkpoint_53( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // realign camera. diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h index 4da50fba7c..7dae345290 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.h @@ -67,6 +67,7 @@ void checkpoint_50( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -77,6 +78,7 @@ void checkpoint_51( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -88,6 +90,7 @@ void checkpoint_52( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -99,6 +102,7 @@ void checkpoint_53( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp index d713bf8943..4b5b72ecc4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp @@ -66,7 +66,7 @@ std::string AutoStory_Checkpoint_54::name() const{ return "054 - " + AutoStory_S std::string AutoStory_Checkpoint_54::start_text() const{ return "Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";} std::string AutoStory_Checkpoint_54::end_text() const{ return "Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";} void AutoStory_Checkpoint_54::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_54(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_54(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -74,10 +74,11 @@ void checkpoint_54( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h index b4f5d51fcb..f3e28c6fb3 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.h @@ -42,6 +42,7 @@ void checkpoint_54( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp index 7c0ee53640..e368e0b76f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp @@ -68,7 +68,7 @@ std::string AutoStory_Checkpoint_55::name() const{ return "055 - " + AutoStory_S std::string AutoStory_Checkpoint_55::start_text() const{ return "Defeated Levincia Gym (Electric). At Levincia (North) Pokecenter.";} std::string AutoStory_Checkpoint_55::end_text() const{ return "Beat Orthworm phase 1 and 2";} void AutoStory_Checkpoint_55::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_55(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_55(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -76,7 +76,7 @@ std::string AutoStory_Checkpoint_56::name() const{ return "056 - " + AutoStory_S std::string AutoStory_Checkpoint_56::start_text() const{ return AutoStory_Checkpoint_55().end_text();} std::string AutoStory_Checkpoint_56::end_text() const{ return "At East Province (Area Three) Pokecenter.";} void AutoStory_Checkpoint_56::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_56(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_56(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -84,7 +84,7 @@ std::string AutoStory_Checkpoint_57::name() const{ return "057 - " + AutoStory_S std::string AutoStory_Checkpoint_57::start_text() const{ return AutoStory_Checkpoint_56().end_text();} std::string AutoStory_Checkpoint_57::end_text() const{ return "At East Province (Area Three) Pokecenter.";} void AutoStory_Checkpoint_57::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_57(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_57(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -93,10 +93,11 @@ void checkpoint_55( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; @@ -476,10 +477,11 @@ void checkpoint_56( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // fly back to East Province (Area Three) Watchtower. from Orthworm // this clears Pokemon in minimap @@ -597,10 +599,11 @@ void checkpoint_57( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering }, false); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h index 2ad4e05608..ed58795a08 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.h @@ -58,6 +58,7 @@ void checkpoint_55( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -68,6 +69,7 @@ void checkpoint_56( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -78,6 +80,7 @@ void checkpoint_57( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp index 395568615d..f7a30a8851 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.cpp @@ -71,7 +71,7 @@ std::string AutoStory_Checkpoint_58::name() const{ return "058 - " + AutoStory_S std::string AutoStory_Checkpoint_58::start_text() const{ return "Beat Orthworm. At East Province (Area Three) Pokecenter.";} std::string AutoStory_Checkpoint_58::end_text() const{ return "Beat Orthworm. At East Province (Area Three) Pokecenter.";} void AutoStory_Checkpoint_58::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_58(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_58(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -79,24 +79,25 @@ std::string AutoStory_Checkpoint_59::name() const{ return "059 - " + AutoStory_S std::string AutoStory_Checkpoint_59::start_text() const{ return AutoStory_Checkpoint_58().end_text();} std::string AutoStory_Checkpoint_59::end_text() const{ return "Beat Team Star (Poison)";} void AutoStory_Checkpoint_59::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_59(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_59(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_60::name() const{ return "060 - " + AutoStory_Segment_25().name(); } std::string AutoStory_Checkpoint_60::start_text() const{ return AutoStory_Checkpoint_59().end_text();} std::string AutoStory_Checkpoint_60::end_text() const{ return "At Medali Pokecenter.";} void AutoStory_Checkpoint_60::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_60(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_60(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } void checkpoint_58( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering @@ -108,10 +109,11 @@ void checkpoint_59( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -320,10 +322,11 @@ void checkpoint_60( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // fly back to Porto Marinada Pokecenter from Team Star Poison // this clears Pokemon in minimap diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h index d06b94d00b..51721c8e87 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_25.h @@ -58,6 +58,7 @@ void checkpoint_58( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -68,6 +69,7 @@ void checkpoint_59( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -78,6 +80,7 @@ void checkpoint_60( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp index 6e269e4819..be9ef0e559 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_61::name() const{ return "061 - " + AutoStory_S std::string AutoStory_Checkpoint_61::start_text() const{ return "At Medali Pokecenter.";} std::string AutoStory_Checkpoint_61::end_text() const{ return "Inside Medali Gym building.";} void AutoStory_Checkpoint_61::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_61(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_61(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -78,14 +78,14 @@ std::string AutoStory_Checkpoint_62::name() const{ return "062 - " + AutoStory_S std::string AutoStory_Checkpoint_62::start_text() const{ return AutoStory_Checkpoint_61().end_text();} std::string AutoStory_Checkpoint_62::end_text() const{ return "Beat Medali Gym. Inside Medali Gym building.";} void AutoStory_Checkpoint_62::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_62(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_62(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_63::name() const{ return "063 - " + AutoStory_Segment_26().name(); } std::string AutoStory_Checkpoint_63::start_text() const{ return AutoStory_Checkpoint_62().end_text();} std::string AutoStory_Checkpoint_63::end_text() const{ return "At Glaseado Mountain Pokecenter.";} void AutoStory_Checkpoint_63::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_63(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_63(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -95,10 +95,11 @@ void checkpoint_61( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // first, clear Pokemon in Minimap. @@ -162,10 +163,11 @@ void checkpoint_62( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); @@ -274,10 +276,11 @@ void checkpoint_63( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // Gym leader defeated. Standing in Gym building diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h index 2d49b7e4b8..cfefa6227c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_26.h @@ -59,6 +59,7 @@ void checkpoint_61( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -69,6 +70,7 @@ void checkpoint_62( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); @@ -80,6 +82,7 @@ void checkpoint_63( SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, + EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text ); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp index 98bcd87e1f..f0ba3bc892 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_64::name() const{ return "064 - " + AutoStory_S std::string AutoStory_Checkpoint_64::start_text() const{ return "At Glaseado Mountain Pokecenter";} std::string AutoStory_Checkpoint_64::end_text() const{ return "At Glaseado Mountain Pokecenter";} void AutoStory_Checkpoint_64::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_64(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_64(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -78,7 +78,7 @@ std::string AutoStory_Checkpoint_65::name() const{ return "065 - " + AutoStory_S std::string AutoStory_Checkpoint_65::start_text() const{ return AutoStory_Checkpoint_64().end_text();} std::string AutoStory_Checkpoint_65::end_text() const{ return "Defeat Dondozo Titan phase 1.";} void AutoStory_Checkpoint_65::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_65(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_65(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -86,7 +86,7 @@ std::string AutoStory_Checkpoint_66::name() const{ return "066 - " + AutoStory_S std::string AutoStory_Checkpoint_66::start_text() const{ return AutoStory_Checkpoint_65().end_text();} std::string AutoStory_Checkpoint_66::end_text() const{ return "Defeat Dondozo Titan phase 2-3.";} void AutoStory_Checkpoint_66::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_66(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_66(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -94,13 +94,13 @@ std::string AutoStory_Checkpoint_67::name() const{ return "067 - " + AutoStory_S std::string AutoStory_Checkpoint_67::start_text() const{ return AutoStory_Checkpoint_66().end_text();} std::string AutoStory_Checkpoint_67::end_text() const{ return "At North Province Area Three Pokecenter";} void AutoStory_Checkpoint_67::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_67(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_67(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -109,8 +109,8 @@ void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -127,8 +127,8 @@ void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); move_from_dondozo_titan_phase1_to_phase2(env, context); @@ -136,8 +136,8 @@ void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); // fly to Glaseado Mountain Pokecenter from Dondozo diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h index f210dbccd2..8bb256f6f6 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_27.h @@ -62,19 +62,19 @@ class AutoStory_Checkpoint_67 : public AutoStory_Checkpoint{ // start: At Glaseado Mountain Pokecenter // end: At Glaseado Mountain Pokecenter -void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_64(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At Glaseado Mountain Pokecenter // end: Defeat Dondozo Titan phase 1. -void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_65(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Defeat Dondozo Titan phase 1. // end: Defeat Dondozo Titan phase 2-3. -void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_66(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Defeat Dondozo Titan phase 2-3. // end: At North Province Area Three Pokecenter -void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_67(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp index d3f78b654f..4d0a35d36b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_68::name() const{ return "068 - " + AutoStory_S std::string AutoStory_Checkpoint_68::start_text() const{ return "At North Province Area Three Pokecenter";} std::string AutoStory_Checkpoint_68::end_text() const{ return "At North Province Area Three Pokecenter";} void AutoStory_Checkpoint_68::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_68(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_68(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -78,20 +78,20 @@ std::string AutoStory_Checkpoint_69::name() const{ return "069 - " + AutoStory_S std::string AutoStory_Checkpoint_69::start_text() const{ return AutoStory_Checkpoint_68().end_text();} std::string AutoStory_Checkpoint_69::end_text() const{ return "Beat Team Star (Fairy)";} void AutoStory_Checkpoint_69::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_69(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_69(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_70::name() const{ return "070 - " + AutoStory_Segment_28().name(); } std::string AutoStory_Checkpoint_70::start_text() const{ return AutoStory_Checkpoint_69().end_text();} std::string AutoStory_Checkpoint_70::end_text() const{ return "At Montenevera Pokecenter";} void AutoStory_Checkpoint_70::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_70(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_70(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint, to preserve ordering @@ -100,8 +100,8 @@ void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); @@ -302,8 +302,8 @@ void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ context.wait_for_all_requests(); // fly back to North Province Area Three diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h index 4207d1d72c..b25fa0e156 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_28.h @@ -54,15 +54,15 @@ class AutoStory_Checkpoint_70 : public AutoStory_Checkpoint{ // start: At North Province Area Three Pokecenter // end: At North Province Area Three Pokecenter -void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_68(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At North Province Area Three Pokecenter // end: Beat Team Star (Fairy) -void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_69(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Team Star (Fairy) // end: At Montenevera Pokecenter -void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_70(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // moves player from Glaseado Mountain Pokecenter to Montenevera Pokecenter diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp index b440b01c34..0dc7b9fe8e 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_71::name() const{ return "071 - " + AutoStory_S std::string AutoStory_Checkpoint_71::start_text() const{ return "At Montenevera Pokecenter";} std::string AutoStory_Checkpoint_71::end_text() const{ return "Spoke to Montenevera gym receptionist. Inside Montenevera gym building.";} void AutoStory_Checkpoint_71::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_71(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_71(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -78,7 +78,7 @@ std::string AutoStory_Checkpoint_72::name() const{ return "072 - " + AutoStory_S std::string AutoStory_Checkpoint_72::start_text() const{ return AutoStory_Checkpoint_71().end_text();} std::string AutoStory_Checkpoint_72::end_text() const{ return "Passed gym test with MC Sledge. Standing in front of MC Sledge, outside the Montenevera gym building.";} void AutoStory_Checkpoint_72::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_72(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_72(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -86,7 +86,7 @@ std::string AutoStory_Checkpoint_73::name() const{ return "073 - " + AutoStory_S std::string AutoStory_Checkpoint_73::start_text() const{ return AutoStory_Checkpoint_72().end_text();} std::string AutoStory_Checkpoint_73::end_text() const{ return "Beat Montenevera Gym. Inside Montenevera gym building.";} void AutoStory_Checkpoint_73::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_73(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_73(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -94,13 +94,13 @@ std::string AutoStory_Checkpoint_74::name() const{ return "074 - " + AutoStory_S std::string AutoStory_Checkpoint_74::start_text() const{ return AutoStory_Checkpoint_73().end_text();} std::string AutoStory_Checkpoint_74::end_text() const{ return "At Glaseado gym Pokecenter.";} void AutoStory_Checkpoint_74::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_74(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_74(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; @@ -155,8 +155,8 @@ void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); @@ -187,8 +187,8 @@ void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; @@ -210,8 +210,8 @@ void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); pbf_wait(context, 3000ms); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h index 948c85caef..c2a4e920b4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_29.h @@ -62,19 +62,19 @@ class AutoStory_Checkpoint_74 : public AutoStory_Checkpoint{ // start: At Montenevera Pokecenter // end: Spoke to Montenevera gym receptionist. Inside Montenevera gym building. -void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_71(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Spoke to Montenevera gym receptionist. Inside Montenevera gym building. // end: Passed gym test with MC Sledge. Standing in front of MC Sledge, outside the Montenevera gym building. -void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_72(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Passed gym test with MC Sledge. Standing in front of MC Sledge, outside the Montenevera gym building. // end: Beat Montenevera Gym. Inside Montenevera gym building. -void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_73(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Montenevera Gym. Inside Montenevera gym building. // end: At Glaseado gym Pokecenter. -void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_74(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // moves player from Montenevera Pokecenter to Glaseado Gym Pokecenter void move_from_montenevera_to_glaseado_gym(SingleSwitchProgramEnvironment& env, ProControllerContext& context); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp index e0bdfc5d83..b185fe5919 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_75::name() const{ return "075 - " + AutoStory_S std::string AutoStory_Checkpoint_75::start_text() const{ return "At Glaseado gym Pokecenter.";} std::string AutoStory_Checkpoint_75::end_text() const{ return "Battled Nemona. Spoke to Glaseado Gym receptionist. Inside Glaseado Gym building.";} void AutoStory_Checkpoint_75::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_75(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_75(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -78,7 +78,7 @@ std::string AutoStory_Checkpoint_76::name() const{ return "076 - " + AutoStory_S std::string AutoStory_Checkpoint_76::start_text() const{ return AutoStory_Checkpoint_75().end_text();} std::string AutoStory_Checkpoint_76::end_text() const{ return "Beat Glaseado Gym Challenge. Beat Glaseado Gym (Ice). Inside Glaseado Gym building.";} void AutoStory_Checkpoint_76::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_76(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_76(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -86,13 +86,13 @@ std::string AutoStory_Checkpoint_77::name() const{ return "077 - " + AutoStory_S std::string AutoStory_Checkpoint_77::start_text() const{ return AutoStory_Checkpoint_76().end_text();} std::string AutoStory_Checkpoint_77::end_text() const{ return "At North Province Area One Pokecenter";} void AutoStory_Checkpoint_77::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_77(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_77(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; @@ -156,8 +156,8 @@ void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); @@ -276,8 +276,8 @@ void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_77(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_77(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ pbf_move_left_joystick(context, {0, -1}, 2400ms, 800ms); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h index 9c4a75b9a5..44698f3350 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_30.h @@ -55,15 +55,15 @@ class AutoStory_Checkpoint_77 : public AutoStory_Checkpoint{ // start: At Glaseado Gym Pokecenter // end: Battled Nemona. Spoke to Glaseado Gym receptionist. Inside Glaseado Gym building. -void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_75(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Spoke to Glaseado Gym receptionist. Inside Glaseado Gym building. // end: Beat Glaseado Gym Challenge. Beat Glaseado Gym (Ice). Inside Glaseado Gym building. -void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_76(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Glaseado Gym Challenge. Beat Glaseado Gym (Ice). Inside Glaseado Gym building. // end: At North Province Area One Pokecenter -void checkpoint_77(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_77(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp index b6a488ce68..a64ee902ff 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.cpp @@ -72,7 +72,7 @@ std::string AutoStory_Checkpoint_78::name() const{ return "078 - " + AutoStory_S std::string AutoStory_Checkpoint_78::start_text() const{ return "At North Province Area One Pokecenter";} std::string AutoStory_Checkpoint_78::end_text() const{ return "At North Province Area Two Pokecenter";} void AutoStory_Checkpoint_78::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_78(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_78(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -80,34 +80,34 @@ std::string AutoStory_Checkpoint_79::name() const{ return "079 - " + AutoStory_S std::string AutoStory_Checkpoint_79::start_text() const{ return AutoStory_Checkpoint_78().end_text();} std::string AutoStory_Checkpoint_79::end_text() const{ return "At North Province Area Two Pokecenter";} void AutoStory_Checkpoint_79::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_79(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_79(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_80::name() const{ return "080 - " + AutoStory_Segment_31().name(); } std::string AutoStory_Checkpoint_80::start_text() const{ return AutoStory_Checkpoint_79().end_text();} std::string AutoStory_Checkpoint_80::end_text() const{ return "Beat Team Star (Fighting)";} void AutoStory_Checkpoint_80::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_80(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_80(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_81::name() const{ return "081 - " + AutoStory_Segment_31().name(); } std::string AutoStory_Checkpoint_81::start_text() const{ return AutoStory_Checkpoint_80().end_text();} std::string AutoStory_Checkpoint_81::end_text() const{ return "At Alfornada Pokecenter.";} void AutoStory_Checkpoint_81::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_81(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_81(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_82::name() const{ return "082 - " + AutoStory_Segment_31().name(); } std::string AutoStory_Checkpoint_82::start_text() const{ return AutoStory_Checkpoint_81().end_text();} std::string AutoStory_Checkpoint_82::end_text() const{ return "At Alfornada Pokecenter.";} void AutoStory_Checkpoint_82::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_82(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_82(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ heal_at_pokecenter(env.program_info(), env.console, context); @@ -118,24 +118,24 @@ void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint }, false); } -void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ beat_team_star_fighting1(env, context, attempt_number); beat_team_star_fighting2(env, context); }); } -void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ move_cursor_towards_flypoint_and_go_there( env.program_info(), @@ -148,8 +148,8 @@ void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h index 7da58e3716..e379bc689c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_31.h @@ -70,25 +70,25 @@ class AutoStory_Checkpoint_82 : public AutoStory_Checkpoint{ // start: At North Province Area One Pokecenter. // end: At North Province Area Two Pokecenter -void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_78(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At North Province Area Two Pokecenter // end: At North Province Area Two Pokecenter -void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_79(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At North Province Area Two Pokecenter // end: Beat Team Star (Fighting) -void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_80(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Team Star (Fighting) // end: At Alfornada Pokecenter. -void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_81(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At Alfornada Pokecenter. // end: At Alfornada Pokecenter. -void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_82(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp index 7fcd35fdff..e578daecc6 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.cpp @@ -70,7 +70,7 @@ std::string AutoStory_Checkpoint_83::name() const{ return "083 - " + AutoStory_S std::string AutoStory_Checkpoint_83::start_text() const{ return "At Alfornada Pokecenter.";} std::string AutoStory_Checkpoint_83::end_text() const{ return "At Alfornada Pokecenter.";} void AutoStory_Checkpoint_83::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_83(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_83(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -78,13 +78,13 @@ std::string AutoStory_Checkpoint_84::name() const{ return "084 - " + AutoStory_S std::string AutoStory_Checkpoint_84::start_text() const{ return AutoStory_Checkpoint_83().end_text();} std::string AutoStory_Checkpoint_84::end_text() const{ return "Beat Alfornada gym challenge. Beat Alfornada gym. At Alfronada Pokecenter.";} void AutoStory_Checkpoint_84::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_84(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_84(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint @@ -92,8 +92,8 @@ void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& co }, false); } -void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ DirectionDetector direction; diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h index 9cca1d941e..84e8a217a2 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_32.h @@ -47,11 +47,11 @@ class AutoStory_Checkpoint_84 : public AutoStory_Checkpoint{ // start: At Alfornada Pokecenter. // end: At Alfornada Pokecenter. -void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_83(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At Alfornada Pokecenter. // end: Beat Alfornada gym challenge. Beat Alfornada gym. At Alfronada Pokecenter. -void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_84(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp index 597573f65d..f7d8089aa2 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.cpp @@ -76,7 +76,7 @@ std::string AutoStory_Checkpoint_85::name() const{ return "085 - " + AutoStory_S std::string AutoStory_Checkpoint_85::start_text() const{ return "Beat Alfornada gym challenge. Beat Alfornada gym. At Alfronada Pokecenter.";} std::string AutoStory_Checkpoint_85::end_text() const{ return "Beat Clavell. At Academy fly point.";} void AutoStory_Checkpoint_85::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_85(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_85(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -84,7 +84,7 @@ std::string AutoStory_Checkpoint_86::name() const{ return "086 - " + AutoStory_S std::string AutoStory_Checkpoint_86::start_text() const{ return AutoStory_Checkpoint_85().end_text();} std::string AutoStory_Checkpoint_86::end_text() const{ return "At Pokemon League entrance.";} void AutoStory_Checkpoint_86::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_86(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_86(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -92,7 +92,7 @@ std::string AutoStory_Checkpoint_87::name() const{ return "087 - " + AutoStory_S std::string AutoStory_Checkpoint_87::start_text() const{ return AutoStory_Checkpoint_86().end_text();} std::string AutoStory_Checkpoint_87::end_text() const{ return "Finished the Entrance quiz. Standing in front of Rika.";} void AutoStory_Checkpoint_87::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_87(env, context, options.notif_status_update, stats, checkpoint_text(), options.language, options.starter_choice); + checkpoint_87(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text(), options.language, options.starter_choice); } @@ -100,7 +100,7 @@ std::string AutoStory_Checkpoint_88::name() const{ return "088 - " + AutoStory_S std::string AutoStory_Checkpoint_88::start_text() const{ return AutoStory_Checkpoint_87().end_text();} std::string AutoStory_Checkpoint_88::end_text() const{ return "Beat the Elite Four. Door to Geeta up ahead.";} void AutoStory_Checkpoint_88::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_88(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_88(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } @@ -108,14 +108,14 @@ std::string AutoStory_Checkpoint_89::name() const{ return "089 - " + AutoStory_S std::string AutoStory_Checkpoint_89::start_text() const{ return AutoStory_Checkpoint_88().end_text();} std::string AutoStory_Checkpoint_89::end_text() const{ return "Beat Geeta. At Pokemon League Pokecenter.";} void AutoStory_Checkpoint_89::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_89(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_89(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, +1, +0.609, 2560ms}, FlyPoint::FAST_TRAVEL); @@ -133,8 +133,8 @@ void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, -1, 0, 400ms); @@ -233,9 +233,9 @@ void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text, Language language, StarterChoice starter_choice){ +void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, Language language, StarterChoice starter_choice){ GameTitle game_title = GameTitle::UNKNOWN; - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ if (game_title == GameTitle::UNKNOWN){ game_title = get_game_title(env, context); @@ -341,8 +341,8 @@ void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // standing in front of Rika // now done talking to Rika. walk around Rika's desk. @@ -425,8 +425,8 @@ void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ walk_forward_until_dialog(env.program_info(), env.console, context, NavigationMovementMode::DIRECTIONAL_ONLY, 60000ms); clear_dialog(env.console, context, ClearDialogMode::STOP_BATTLE, 60, {CallbackEnum::BATTLE, CallbackEnum::DIALOG_ARROW, CallbackEnum::PROMPT_DIALOG}); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h index b3a19f1db3..53f28e2578 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_33.h @@ -75,23 +75,23 @@ class AutoStory_Checkpoint_89 : public AutoStory_Checkpoint{ // start: Beat Alfornada gym challenge. Beat Alfornada gym. At Alfronada Pokecenter. // end: Beat Clavell. At Academy fly point. -void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_85(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Clavell. At Academy fly point. // end: At Pokemon League entrance. -void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_86(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: At Pokemon League entrance. // end: Finished the Entrance quiz. Standing in front of Rika. -void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text, Language language, StarterChoice starter_choice); +void checkpoint_87(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text, Language language, StarterChoice starter_choice); // start: Finished the Entrance quiz. Standing in front of Rika. // end: Beat the Elite Four. Door to Geeta up ahead. -void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_88(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat the Elite Four. Door to Geeta up ahead. // end: Beat Geeta. At Pokemon League Pokecenter. -void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_89(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); GameTitle get_game_title(SingleSwitchProgramEnvironment& env, ProControllerContext& context); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp index afa1b38492..6ea91545cc 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.cpp @@ -66,27 +66,27 @@ std::string AutoStory_Checkpoint_90::name() const{ return "090 - " + AutoStory_S std::string AutoStory_Checkpoint_90::start_text() const{ return "Beat Geeta. At Pokemon League Pokecenter.";} std::string AutoStory_Checkpoint_90::end_text() const{ return "Beat Nemona. At dormitory room, next to bed.";} void AutoStory_Checkpoint_90::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_90(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_90(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_91::name() const{ return "091 - " + AutoStory_Segment_34().name(); } std::string AutoStory_Checkpoint_91::start_text() const{ return AutoStory_Checkpoint_90().end_text();} std::string AutoStory_Checkpoint_91::end_text() const{ return "Beat Penny. At Academy fly point.";} void AutoStory_Checkpoint_91::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_91(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_91(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_92::name() const{ return "092 - " + AutoStory_Segment_34().name(); } std::string AutoStory_Checkpoint_92::start_text() const{ return AutoStory_Checkpoint_91().end_text();} std::string AutoStory_Checkpoint_92::end_text() const{ return "Beat Arven. At Los Platos Pokecenter.";} void AutoStory_Checkpoint_92::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_92(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_92(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // Fly to Academy move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::KEEP_ZOOM, +1, -0.803, 640ms}, FlyPoint::FAST_TRAVEL); @@ -114,8 +114,8 @@ void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // walk down @@ -208,8 +208,8 @@ void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& co }); } -void checkpoint_92(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_92(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ move_cursor_towards_flypoint_and_go_there(env.program_info(), env.console, context, {ZoomChange::ZOOM_IN, +0.134, -1, 2800ms}, FlyPoint::FAST_TRAVEL); handle_unexpected_battles(env.program_info(), env.console, context, diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h index 33481c96fd..a0fca5b3a5 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_34.h @@ -54,15 +54,15 @@ class AutoStory_Checkpoint_92 : public AutoStory_Checkpoint{ // start: Beat Geeta. At Pokemon League Pokecenter. // end: Beat Nemona. At dormitory room, next to bed. -void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_90(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Nemona. At dormitory room, next to bed. // end: Beat Penny. At Academy fly point. -void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_91(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Beat Penny. At Academy fly point. // end: Beat Arven. At Los Platos Pokecenter. -void checkpoint_92(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_92(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp index 5b033abab9..d47f6e3400 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.cpp @@ -67,26 +67,26 @@ std::string AutoStory_Checkpoint_93::name() const{ return "093 - " + AutoStory_S std::string AutoStory_Checkpoint_93::start_text() const{ return "Beat Arven. At Los Platos Pokecenter.";} std::string AutoStory_Checkpoint_93::end_text() const{ return "Entered Area Zero Gate. Flew down to Area Zero from the platform.";} void AutoStory_Checkpoint_93::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_93(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_93(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_94::name() const{ return "094 - " + AutoStory_Segment_35().name(); } std::string AutoStory_Checkpoint_94::start_text() const{ return AutoStory_Checkpoint_93().end_text();} std::string AutoStory_Checkpoint_94::end_text() const{ return "Inside Area Zero Station 1. Deactivated the locks.";} void AutoStory_Checkpoint_94::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_94(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_94(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_95::name() const{ return "095 - " + AutoStory_Segment_35().name(); } std::string AutoStory_Checkpoint_95::start_text() const{ return AutoStory_Checkpoint_94().end_text();} std::string AutoStory_Checkpoint_95::end_text() const{ return "Inside Area Zero Station 1. Deactivated the locks.";} void AutoStory_Checkpoint_95::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_95(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_95(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // fly to Medali West from Los Platos Pokecenter // this clears Pokemon in minimap @@ -229,8 +229,8 @@ void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& co } -void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ @@ -635,8 +635,8 @@ void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& co }, false); } -void checkpoint_95(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_95(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h index 5f2291186d..31d34377ae 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_35.h @@ -52,15 +52,15 @@ class AutoStory_Checkpoint_95 : public AutoStory_Checkpoint{ // start: Beat Arven. At Los Platos Pokecenter. // end: Entered Area Zero Gate. Flew down to Area Zero from the platform. -void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_93(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Entered Area Zero Gate. Flew down to Area Zero from the platform. // end: Inside Area Zero Station 1. Deactivated the locks. -void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_94(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Inside Area Zero Station 1. Deactivated the locks. // end: Inside Area Zero Station 1. Deactivated the locks. -void checkpoint_95(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_95(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.cpp index 4e99771b1d..779d47a195 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.cpp @@ -65,21 +65,21 @@ std::string AutoStory_Checkpoint_96::name() const{ return "096 - " + AutoStory_S std::string AutoStory_Checkpoint_96::start_text() const{ return "Inside Area Zero Station 1. Deactivated the locks.";} std::string AutoStory_Checkpoint_96::end_text() const{ return "Inside Area Zero Station 2. Deactivated the locks.";} void AutoStory_Checkpoint_96::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_96(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_96(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_97::name() const{ return "097 - " + AutoStory_Segment_36().name(); } std::string AutoStory_Checkpoint_97::start_text() const{ return AutoStory_Checkpoint_96().end_text();} std::string AutoStory_Checkpoint_97::end_text() const{ return "Inside Area Zero Station 2. Deactivated the locks.";} void AutoStory_Checkpoint_97::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_97(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_97(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ YOLOv5Detector yolo_detector(DOWNLOADED_RESOURCE_PATH() + "PokemonSV/AreaZero/A0-station-2.onnx"); @@ -306,8 +306,8 @@ void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& co }, false); } -void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h index 7b3fe9f406..1119d29fb1 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_36.h @@ -45,11 +45,11 @@ class AutoStory_Checkpoint_97 : public AutoStory_Checkpoint{ // start: Inside Area Zero Station 1. Deactivated the locks. // end: Inside Area Zero Station 2. Deactivated the locks. -void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_96(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Inside Area Zero Station 2. Deactivated the locks. // end: Inside Area Zero Station 2. Deactivated the locks. -void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_97(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.cpp index 7a0bb12c2d..cdacf3f3b6 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.cpp @@ -65,18 +65,18 @@ std::string AutoStory_Checkpoint_98::name() const{ return "098 - " + AutoStory_S std::string AutoStory_Checkpoint_98::start_text() const{ return "Inside Area Zero Station 2. Deactivated the locks.";} std::string AutoStory_Checkpoint_98::end_text() const{ return "Inside Area Zero Station 3. Deactivated the locks.";} void AutoStory_Checkpoint_98::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_98(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_98(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_99::name() const{ return "099 - " + AutoStory_Segment_37().name(); } std::string AutoStory_Checkpoint_99::start_text() const{ return AutoStory_Checkpoint_98().end_text();} std::string AutoStory_Checkpoint_99::end_text() const{ return "Inside Area Zero Station 3. Deactivated the locks.";} void AutoStory_Checkpoint_99::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_99(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_99(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ YOLOv5Detector yolo_detector(DOWNLOADED_RESOURCE_PATH() + "PokemonSV/AreaZero/A0-station-3.onnx"); @@ -348,8 +348,8 @@ void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& co }, false); } -void checkpoint_99(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_99(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ // empty checkpoint diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.h index 117e0dc76c..5a52ed6ae6 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_37.h @@ -45,11 +45,11 @@ class AutoStory_Checkpoint_99 : public AutoStory_Checkpoint{ // start: Inside Area Zero Station 2. Deactivated the locks. // end: Inside Area Zero Station 3. Deactivated the locks. -void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_98(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Inside Area Zero Station 3. Deactivated the locks. // end: Inside Area Zero Station 3. Deactivated the locks. -void checkpoint_99(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_99(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp index 95610b7647..f567fb730c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.cpp @@ -65,19 +65,19 @@ std::string AutoStory_Checkpoint_100::name() const{ return "100 - " + AutoStory_ std::string AutoStory_Checkpoint_100::start_text() const{ return "Inside Area Zero Station 3. Deactivated the locks.";} std::string AutoStory_Checkpoint_100::end_text() const{ return "Entered inner cave. Finished cutscene, admiring the waterfall/large crystals.";} void AutoStory_Checkpoint_100::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_100(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_100(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_101::name() const{ return "101 - " + AutoStory_Segment_38().name(); } std::string AutoStory_Checkpoint_101::start_text() const{ return AutoStory_Checkpoint_100().end_text();} std::string AutoStory_Checkpoint_101::end_text() const{ return "Inside Area Zero Station 4. Deactivated the locks.";} void AutoStory_Checkpoint_101::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_101(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_101(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ YOLOv5Detector yolo_detector(DOWNLOADED_RESOURCE_PATH() + "PokemonSV/AreaZero/A0-station-4a.onnx"); @@ -243,8 +243,8 @@ void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& c }, false); } -void checkpoint_101(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_101(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.h index a502079a32..1ac6826492 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_38.h @@ -46,11 +46,11 @@ class AutoStory_Checkpoint_101 : public AutoStory_Checkpoint{ // start: Inside Area Zero Station 3. Deactivated the locks. // end: Entered inner cave. Finished cutscene, admiring the waterfall/large crystals. -void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_100(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Entered inner cave. Finished cutscene, admiring the waterfall/large crystals. // end: Inside Area Zero Station 4. Deactivated the locks. -void checkpoint_101(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_101(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.cpp index 6ac0386b62..43bab8d871 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.cpp @@ -65,19 +65,19 @@ std::string AutoStory_Checkpoint_102::name() const{ return "102 - " + AutoStory_ std::string AutoStory_Checkpoint_102::start_text() const{ return "Inside Area Zero Station 4. Deactivated the locks.";} std::string AutoStory_Checkpoint_102::end_text() const{ return "Opened Zero lab. Defeated Paradox Pokemon.";} void AutoStory_Checkpoint_102::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_102(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_102(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } std::string AutoStory_Checkpoint_103::name() const{ return "103 - " + AutoStory_Segment_39().name(); } std::string AutoStory_Checkpoint_103::start_text() const{ return AutoStory_Checkpoint_102().end_text();} std::string AutoStory_Checkpoint_103::end_text() const{ return "";} void AutoStory_Checkpoint_103::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_103(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_103(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } -void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ YOLOv5Detector yolo_detector(DOWNLOADED_RESOURCE_PATH() + "PokemonSV/AreaZero/A0-lab.onnx"); @@ -274,8 +274,8 @@ void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& c }, false); } -void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ do_action_and_monitor_for_battles(env.program_info(), env.console, context, diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.h index 71c3caec68..41dd383fa3 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_39.h @@ -46,11 +46,11 @@ class AutoStory_Checkpoint_103 : public AutoStory_Checkpoint{ // start: Inside Area Zero Station 4. Deactivated the locks. // end: Opened Zero lab. Defeated Paradox Pokemon. -void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_102(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // start: Opened Zero lab. Defeated Paradox Pokemon. // end: Entered Zero Lab. Spoke to AI Professor. -void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_103(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.cpp index 4eb996e12c..cefaee7444 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.cpp @@ -66,18 +66,18 @@ std::string AutoStory_Checkpoint_104::name() const{ return "104 - " + AutoStory_ std::string AutoStory_Checkpoint_104::start_text() const{ return "Entered Zero Lab. Spoke to AI Professor.";} std::string AutoStory_Checkpoint_104::end_text() const{ return "Battled the AI Professor. Completed the game.";} void AutoStory_Checkpoint_104::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ - checkpoint_104(env, context, options.notif_status_update, stats, checkpoint_text()); + checkpoint_104(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); } // std::string AutoStory_Checkpoint_105::name() const{ return "105 - " + AutoStory_Segment_40().name(); } // std::string AutoStory_Checkpoint_105::start_text() const{ return "";} // std::string AutoStory_Checkpoint_105::end_text() const{ return "";} // void AutoStory_Checkpoint_105::run_checkpoint(SingleSwitchProgramEnvironment& env, ProControllerContext& context, AutoStoryOptions options, AutoStoryStats& stats) const{ -// checkpoint_105(env, context, options.notif_status_update, stats, checkpoint_text()); +// checkpoint_105(env, context, options.notif_status_update, options.notif_error_recoverable, stats, checkpoint_text()); // } -void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ - checkpoint_reattempt_loop(env, context, notif_status_update, stats, checkpoint_text, +void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ + checkpoint_reattempt_loop(env, context, notif_status_update, notif_error_recoverable, stats, checkpoint_text, [&](size_t attempt_number){ pbf_press_button(context, BUTTON_L, 240ms, 80ms); @@ -174,7 +174,7 @@ void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& c }, false); } -// void checkpoint_105(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text){ +// void checkpoint_105(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text){ // } diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.h index eb9e5d6369..4439bb4a41 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_40.h @@ -46,11 +46,11 @@ class AutoStory_Checkpoint_104 : public AutoStory_Checkpoint{ // start: Entered Zero Lab. Spoke to AI Professor. // end: Battled the AI Professor. Completed the game. -void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +void checkpoint_104(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); // // start: // // end: -// void checkpoint_105(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, AutoStoryStats& stats, const std::string& checkpoint_text); +// void checkpoint_105(SingleSwitchProgramEnvironment& env, ProControllerContext& context, EventNotificationOption& notif_status_update, EventNotificationOption& notif_error_recoverable, AutoStoryStats& stats, const std::string& checkpoint_text); diff --git a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ClaimMysteryGift.cpp b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ClaimMysteryGift.cpp index f455c75502..f296494aac 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ClaimMysteryGift.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Farming/PokemonSV_ClaimMysteryGift.cpp @@ -372,7 +372,8 @@ void ClaimMysteryGift::run_autostory_until_pokeportal_unlocked(SingleSwitchProgr AutoStoryOptions options{ LANGUAGE, StarterChoice::FUECOCO, - NOTIFICATION_STATUS_UPDATE + NOTIFICATION_STATUS_UPDATE, + NOTIFICATION_ERROR_RECOVERABLE }; AutoStoryStats stats; // unused for (size_t segment_index = 0; segment_index <= 6; segment_index++){ From db5ffa934f30bd54f7e63770e49bdfaabb49eafc Mon Sep 17 00:00:00 2001 From: jw098 Date: Tue, 25 Aug 2026 12:43:24 -0700 Subject: [PATCH 2/2] remove more usage of ScreenshotException::send_recoverable_notification --- .../AutoStory/PokemonSV_AutoStoryTools.cpp | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp index 6666a5f976..e52cd22ac9 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp @@ -1456,12 +1456,17 @@ void checkpoint_reattempt_loop( break; }catch (OperationFailedException& e){ if (i == 10){ // send an error report for debugging if 10 failed attempts for a given checkpoint. - OperationFailedException exception( - ErrorReport::SEND_ERROR_REPORT, - "10 failed attempts. " + checkpoint_text, - env.console + auto snapshot = env.console.video().snapshot().frame; + std::string message = "10 failed attempts. " + checkpoint_text; + send_program_recoverable_error_notification(env, notif_error_recoverable, message, *snapshot); + report_error( + &env.logger(), + env.program_info(), + "Recoverable: OperationFailedExceptionWithScreenshot", + {{"Message:", message}}, + *snapshot, + &env.console.history() ); - exception.send_recoverable_notification(env); } if (i > max_attempts){ @@ -1511,12 +1516,17 @@ void checkpoint_reattempt_loop_tutorial( break; }catch (OperationFailedException& e){ if (i == 10){ // send an error report for debugging if 10 failed attempts for a given checkpoint. - OperationFailedException exception( - ErrorReport::SEND_ERROR_REPORT, - "10 failed attempts. " + checkpoint_text, - env.console + auto snapshot = env.console.video().snapshot().frame; + std::string message = "10 failed attempts. " + checkpoint_text; + send_program_recoverable_error_notification(env, notif_error_recoverable, message, *snapshot); + report_error( + &env.logger(), + env.program_info(), + "Recoverable: OperationFailedExceptionWithScreenshot", + {{"Message:", message}}, + *snapshot, + &env.console.history() ); - exception.send_recoverable_notification(env); } if (i > max_attempts){