diff --git a/SerialPrograms/Source/NintendoSwitch/Inference/NintendoSwitch_DateReader.cpp b/SerialPrograms/Source/NintendoSwitch/Inference/NintendoSwitch_DateReader.cpp index 103c25e27..3c021c6d8 100644 --- a/SerialPrograms/Source/NintendoSwitch/Inference/NintendoSwitch_DateReader.cpp +++ b/SerialPrograms/Source/NintendoSwitch/Inference/NintendoSwitch_DateReader.cpp @@ -169,10 +169,10 @@ void DateReader::set_hours( { auto snapshot = console.video().snapshot(); if (!detect(snapshot)){ - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::SEND_ERROR_REPORT, "Expected date change menu.", - true + console ); } } @@ -189,10 +189,10 @@ void DateReader::set_hours( VideoSnapshot snapshot = console.video().snapshot(); int8_t current_hour = read_hours(console.logger(), snapshot); if (current_hour < 0){ - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::SEND_ERROR_REPORT, "Unable to read the hour.", - true + console ); } @@ -244,10 +244,10 @@ void DateReader::set_hours( } // auto snapshot = console.video().snapshot(); - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::SEND_ERROR_REPORT, "Failed to set the hour after 10 attempts.", - true + console ); } @@ -574,10 +574,10 @@ void DateReader::set_date( } ssf_flush_pipeline(context); - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::SEND_ERROR_REPORT, "Failed to set the hour after 10 attempts.", - true + console ); } diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterDetection.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterDetection.cpp index c727266ce..9a7413743 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterDetection.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterDetection.cpp @@ -179,10 +179,10 @@ bool StandardEncounterDetection::run_overrides( ShinyType shiny = side_shiny; if (shiny == ShinyType::MAYBE_SHINY){ // actions.emplace_back(EncounterAction::StopProgram, ""); - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, m_console, + throw_and_log( + m_console, ErrorReport::SEND_ERROR_REPORT, "Cannot run encounter actions due to low confidence shiny detection.", - false + m_console ); } @@ -242,10 +242,10 @@ EncounterActionFull StandardEncounterDetection::get_action_doubles(){ m_console.log(str_right); if (action_left != action_right){ - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, m_console, + throw_and_log( + m_console, ErrorReport::NO_ERROR_REPORT, "Conflicting actions requested.\n" + str_left + "\n" + str_right, - false + m_console ); } @@ -257,10 +257,10 @@ EncounterActionFull StandardEncounterDetection::get_action_doubles(){ // Double battle and someone is set to auto-catch. if (auto_catch && m_double_battle){ - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, m_console, + throw_and_log( + m_console, ErrorReport::NO_ERROR_REPORT, "Cannot auto-catch in a double battle.", - false + m_console ); } diff --git a/SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterHandler.cpp b/SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterHandler.cpp index 5a8b013f0..f0ff33a18 100644 --- a/SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterHandler.cpp +++ b/SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterHandler.cpp @@ -283,10 +283,10 @@ bool StandardEncounterHandler::handle_standard_encounter_end_battle( pbf_mash_button(m_context, BUTTON_B, 2 * TICKS_PER_SECOND); break; default: - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, m_console, + throw_and_log( + m_console, ErrorReport::NO_ERROR_REPORT, "Unable to recover from failed catch.", - true + m_console ); } return false; diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h index 504b7cc9e..584d6ed9b 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.h @@ -7,11 +7,13 @@ #ifndef PokemonAutomation_PokemonSV_AutoStoryTools_H #define PokemonAutomation_PokemonSV_AutoStoryTools_H -#include "Common/Cpp/DateTime.h" -#include "NintendoSwitch/NintendoSwitch_SingleSwitchProgram.h" -#include "CommonFramework/Tools/StatsTracking.h" +#include #include "CommonFramework/Language.h" +#include "CommonFramework/ImageTools/ImageBoxes.h" +#include "CommonFramework/Tools/StatsTracking.h" +#include "NintendoSwitch/NintendoSwitch_SingleSwitchProgram.h" // #include "PokemonSV/Programs/PokemonSV_Navigation.h" + namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ diff --git a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_00.cpp b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_00.cpp index 1dbcd24a6..f6caa4fe4 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_00.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_00.cpp @@ -4,16 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -31,8 +24,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - std::string AutoStory_Segment_00::name() const{ return "00: Intro Cutscene"; 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 03c324d25..198c3ca72 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_01.cpp @@ -4,16 +4,11 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" #include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -31,7 +26,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; 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 0a22ddda6..c09e57bc5 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_02.cpp @@ -4,16 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -31,7 +24,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; 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 0c83c0af4..97381c119 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_03.cpp @@ -4,16 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" @@ -30,7 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; 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 67cbd85b3..74acf7a94 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_04.cpp @@ -4,16 +4,10 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -30,7 +24,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; 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 321cb6ec2..75d5b9b0a 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_05.cpp @@ -4,16 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" @@ -30,7 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; 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 eeac83171..ddf7e45b5 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_06.cpp @@ -4,16 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -30,7 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; 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 0f66d818d..2af7c8163 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_07.cpp @@ -4,16 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" @@ -30,8 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 833ba08c7..a44b8d3c2 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_08.cpp @@ -4,16 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -30,8 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 fedcbf65a..93b3decd6 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_09.cpp @@ -4,16 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -30,8 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 ac56cac5e..f1cccd5b5 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_10.cpp @@ -4,16 +4,10 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -31,8 +25,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 14941c8b7..d7d340d56 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_11.cpp @@ -4,23 +4,14 @@ * */ -#include "Common/Cpp/DateTime.h" -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/Exceptions/OliveActionFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "NintendoSwitch/Commands/NintendoSwitch_Commands_Routines.h" #include "NintendoSwitch/Programs/NintendoSwitch_GameEntry.h" #include "NintendoSwitch/Inference/NintendoSwitch_DateReader.h" #include "PokemonSwSh/Commands/PokemonSwSh_Commands_DateSpam.h" #include "NintendoSwitch/NintendoSwitch_Settings.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/PokemonSV_Settings.h" @@ -40,7 +31,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; 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 030691300..ebe91158c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_12.cpp @@ -4,16 +4,10 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -32,8 +26,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 6cb0c08bb..d6ad59097 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_13.cpp @@ -4,16 +4,10 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV_AutoStoryTools.h" @@ -29,8 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 ccb47b58a..0151fdd7a 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_14.cpp @@ -4,16 +4,10 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -30,8 +24,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 0f08e6954..0cefd3189 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_15.cpp @@ -4,16 +4,10 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/PokemonSV_TutorialDetector.h" @@ -32,8 +26,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - @@ -173,7 +165,7 @@ void checkpoint_33( [&](BotBaseContext& context){ DirectionDetector direction; - int seconds_wait = 6; + uint16_t seconds_wait = 6; pbf_move_left_joystick(context, 128, 0, 250, 100); direction.change_direction(env.program_info(), env.console, context, 3); 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 cca408902..c83f65910 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_16.cpp @@ -4,19 +4,12 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" -#include "PokemonSV/Inference/Overworld/PokemonSV_OverworldDetector.h" +#include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "PokemonSV_AutoStoryTools.h" #include "PokemonSV_AutoStory_Segment_16.h" @@ -30,8 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 d5f80ed2e..881b1558d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_17.cpp @@ -4,20 +4,12 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" -#include "PokemonSV/Inference/Overworld/PokemonSV_OverworldDetector.h" #include "PokemonSV_AutoStoryTools.h" #include "PokemonSV_AutoStory_Segment_17.h" @@ -31,8 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 ca5e50136..8ecce1936 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_18.cpp @@ -4,16 +4,10 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" @@ -31,8 +25,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 f67c51d96..8bc60661c 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_19.cpp @@ -4,17 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" -#include "CommonFramework/Exceptions/UnexpectedBattleException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" @@ -31,8 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 b32b74d2b..9fde39d2d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_20.cpp @@ -4,17 +4,10 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" #include "CommonFramework/Exceptions/OperationFailedException.h" -#include "CommonFramework/Exceptions/UnexpectedBattleException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "PokemonSV/Inference/Overworld/PokemonSV_NoMinimapDetector.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" @@ -32,8 +25,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 e77295e41..1fe6dc350 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_21.cpp @@ -4,17 +4,9 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" -#include "CommonFramework/Exceptions/UnexpectedBattleException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" #include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" @@ -31,8 +23,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 1df2afc5e..3b71792b8 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_22.cpp @@ -4,17 +4,8 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" -#include "CommonFramework/Exceptions/UnexpectedBattleException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" -#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" @@ -31,8 +22,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 7001197cd..c28c4565d 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_23.cpp @@ -4,17 +4,8 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" -#include "CommonFramework/Exceptions/UnexpectedBattleException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" -#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" @@ -31,8 +22,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - 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 ae949e764..049272204 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory_Segment_24.cpp @@ -4,17 +4,8 @@ * */ -#include "CommonFramework/GlobalSettingsPanel.h" -#include "CommonFramework/Exceptions/FatalProgramException.h" -#include "CommonFramework/Exceptions/OperationFailedException.h" -#include "CommonFramework/Exceptions/UnexpectedBattleException.h" #include "CommonFramework/InferenceInfra/InferenceRoutines.h" -#include "CommonFramework/Notifications/ProgramNotifications.h" -#include "CommonFramework/Tools/StatsTracking.h" #include "CommonFramework/Tools/VideoResolutionCheck.h" -#include "NintendoSwitch/Commands/NintendoSwitch_Commands_PushButtons.h" -#include "Pokemon/Pokemon_Strings.h" -#include "PokemonSwSh/Inference/PokemonSwSh_IvJudgeReader.h" #include "PokemonSV/Inference/Overworld/PokemonSV_DirectionDetector.h" #include "PokemonSV/Programs/PokemonSV_GameEntry.h" #include "PokemonSV/Programs/PokemonSV_SaveGame.h" @@ -31,8 +22,6 @@ namespace PokemonAutomation{ namespace NintendoSwitch{ namespace PokemonSV{ -using namespace Pokemon; - diff --git a/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggHatcher.cpp b/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggHatcher.cpp index 97a87624e..16c9d12d6 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggHatcher.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Eggs/PokemonSV_EggHatcher.cpp @@ -102,10 +102,10 @@ void EggHatcher::hatch_one_box(SingleSwitchProgramEnvironment& env, BotBaseConte { const uint8_t expected_empty_slots_in_party = HAS_CLONE_RIDE_POKEMON ? 4 : 5; if (check_empty_slots_in_party(env.program_info(), env.console, context) != expected_empty_slots_in_party){ - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, env.console, + throw_and_log( + env.console, ErrorReport::SEND_ERROR_REPORT, "Your party should have " + std::to_string(expected_empty_slots_in_party) + " " + STRING_POKEMON + ".", - true + env.console ); } } @@ -160,10 +160,10 @@ void EggHatcher::hatch_one_box(SingleSwitchProgramEnvironment& env, BotBaseConte num_eggs = check_egg_party_column(env.program_info(), env.console, context).first; if (num_eggs > 0){ - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, env.console, + throw_and_log( + env.console, ErrorReport::SEND_ERROR_REPORT, "Detected egg in party after hatching.", - true + env.console ); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_AutonomousBallThrower.cpp b/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_AutonomousBallThrower.cpp index 7d2c50b5e..1603bb1f6 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_AutonomousBallThrower.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_AutonomousBallThrower.cpp @@ -77,27 +77,6 @@ AutonomousBallThrower::AutonomousBallThrower() -#if 0 -void AutonomousBallThrower::throw_ball(ConsoleHandle& console, BotBaseContext& context){ - pbf_press_button(context, BUTTON_X, 20, 100); - context.wait_for_all_requests(); - - BattleBallReader reader(console, LANGUAGE); - int quantity = move_to_ball(reader, console, context, BALL_SELECT.slug()); - if (quantity == 0){ - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, console, - "Unable to find appropriate ball. Did you run out?", - true - ); - } - if (quantity < 0){ - console.log("Unable to read ball quantity.", COLOR_RED); - } - pbf_mash_button(context, BUTTON_A, 125); - context.wait_for_all_requests(); -} -#endif void AutonomousBallThrower::program(SingleSwitchProgramEnvironment& env, BotBaseContext& context){ assert_16_9_720p_min(env.logger(), env.console); diff --git a/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_MassPurchase.cpp b/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_MassPurchase.cpp index c38a54875..30aeabe04 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_MassPurchase.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/General/PokemonSV_MassPurchase.cpp @@ -103,10 +103,10 @@ bool MassPurchase::mass_purchase(ProgramEnvironment& env, ConsoleHandle& console case 0: env.log("Error - Stuck in Overworld"); stats.errors++; - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::SEND_ERROR_REPORT, "Stuck in Overworld.", - true + console ); case 1: @@ -140,10 +140,10 @@ bool MassPurchase::extra_items(ProgramEnvironment& env, ConsoleHandle& console, case 0: env.log("Error - Stuck in Overworld"); stats.errors++; - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::SEND_ERROR_REPORT, "Stuck in Overworld.", - true + console ); case 1: diff --git a/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp b/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp index 3f401b58f..117e95467 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_CloneItems-1.0.1.cpp @@ -300,10 +300,10 @@ void CloneItems101::program(SingleSwitchProgramEnvironment& env, BotBaseContext& ); context.wait_for(std::chrono::milliseconds(50)); if (ret < 0){ - throw FatalProgramException( - ErrorReport::SEND_ERROR_REPORT, env.console, + throw_and_log( + env.console, ErrorReport::SEND_ERROR_REPORT, "Unable to recover from error state.", - true + env.console ); } } diff --git a/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp b/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp index e84275dfc..7bbb4d69f 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/Glitches/PokemonSV_RideCloner-1.0.1.cpp @@ -318,10 +318,10 @@ bool RideCloner101::run_post_win( BattleBallReader reader(console, LANGUAGE); int quantity = move_to_ball(reader, console, context, BALL_SELECT.slug()); if (quantity == 0){ - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::NO_ERROR_REPORT, "Unable to find appropriate ball. Did you run out?", - true + console ); } if (quantity < 0){ diff --git a/SerialPrograms/Source/PokemonSV/Programs/ShinyHunting/PokemonSV_LetsGoTools.cpp b/SerialPrograms/Source/PokemonSV/Programs/ShinyHunting/PokemonSV_LetsGoTools.cpp index c1a38e65b..8f2e01239 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/ShinyHunting/PokemonSV_LetsGoTools.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/ShinyHunting/PokemonSV_LetsGoTools.cpp @@ -287,10 +287,10 @@ void LetsGoEncounterBotTracker::process_battle( case CatchResult::POKEMON_FAINTED: break; default: - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, m_console, + throw_and_log( + m_console, ErrorReport::NO_ERROR_REPORT, "Unable to recover from failed catch.", - true + m_console ); } diff --git a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraRoutines.cpp b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraRoutines.cpp index 79adbefe1..ac1ef1135 100644 --- a/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraRoutines.cpp +++ b/SerialPrograms/Source/PokemonSV/Programs/TeraRaids/PokemonSV_TeraRoutines.cpp @@ -409,10 +409,10 @@ void exit_tera_win_by_catching( BattleBallReader reader(console, language); int quantity = move_to_ball(reader, console, context, ball_slug); if (quantity == 0){ - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::NO_ERROR_REPORT, "Unable to find appropriate ball. Did you run out?", - true + console ); } if (quantity < 0){ @@ -525,10 +525,10 @@ TeraResult exit_tera_win_by_catching( BattleBallReader reader(console, language); int quantity = move_to_ball(reader, console, context, ball_slug); if (quantity == 0){ - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, console, + throw_and_log( + console, ErrorReport::NO_ERROR_REPORT, "Unable to find appropriate ball. Did you run out?", - true + console ); } if (quantity < 0){ diff --git a/SerialPrograms/Source/PokemonSwSh/Programs/PokemonSwSh_EncounterHandler.cpp b/SerialPrograms/Source/PokemonSwSh/Programs/PokemonSwSh_EncounterHandler.cpp index d4ea2062d..5bd55c6c9 100644 --- a/SerialPrograms/Source/PokemonSwSh/Programs/PokemonSwSh_EncounterHandler.cpp +++ b/SerialPrograms/Source/PokemonSwSh/Programs/PokemonSwSh_EncounterHandler.cpp @@ -248,10 +248,10 @@ bool StandardEncounterHandler::handle_standard_encounter_end_battle( case CatchResult::POKEMON_FAINTED: break; default: - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, m_console, + throw_and_log( + m_console, ErrorReport::NO_ERROR_REPORT, "Unable to recover from failed catch.", - true + m_console ); } return false; @@ -278,10 +278,10 @@ bool StandardEncounterHandler::handle_standard_encounter_end_battle( pbf_mash_button(m_context, BUTTON_B, 2 * TICKS_PER_SECOND); break; default: - throw FatalProgramException( - ErrorReport::NO_ERROR_REPORT, m_console, + throw_and_log( + m_console, ErrorReport::NO_ERROR_REPORT, "Unable to recover from failed catch.", - true + m_console ); } return false;