diff --git a/SerialPrograms/Source/PokemonSwSh/Options/PokemonSwSh_CramomaticTable.cpp b/SerialPrograms/Source/PokemonSwSh/Options/PokemonSwSh_CramomaticTable.cpp index 1d548657bd..c470d03e42 100644 --- a/SerialPrograms/Source/PokemonSwSh/Options/PokemonSwSh_CramomaticTable.cpp +++ b/SerialPrograms/Source/PokemonSwSh/Options/PokemonSwSh_CramomaticTable.cpp @@ -36,6 +36,15 @@ CramomaticRow::CramomaticRow(EditableTableOption& parent_table) PA_ADD_OPTION(is_bonus); PA_ADD_OPTION(priority); } + +CramomaticRow::CramomaticRow(EditableTableOption& parent_table, CramomaticBallType p_ball_type, bool p_is_bonus, uint16_t p_priority) + : CramomaticRow(parent_table) +{ + ball_type.set(p_ball_type); + is_bonus = p_is_bonus; + priority.set(p_priority); +} + std::unique_ptr CramomaticRow::clone() const{ std::unique_ptr ret(new CramomaticRow(parent())); ret->ball_type.set_value(ball_type.current_value()); @@ -79,7 +88,8 @@ std::vector CramomaticTable::make_header() const{ std::vector> CramomaticTable::make_defaults(){ std::vector> ret; - ret.emplace_back(std::make_unique(*this)); + ret.emplace_back(std::make_unique(*this, CramomaticBallType::Apricorn, true, 1)); + ret.emplace_back(std::make_unique(*this, CramomaticBallType::Apricorn, false, 0)); return ret; } diff --git a/SerialPrograms/Source/PokemonSwSh/Options/PokemonSwSh_CramomaticTable.h b/SerialPrograms/Source/PokemonSwSh/Options/PokemonSwSh_CramomaticTable.h index 371a9d1f7e..97d4613b24 100644 --- a/SerialPrograms/Source/PokemonSwSh/Options/PokemonSwSh_CramomaticTable.h +++ b/SerialPrograms/Source/PokemonSwSh/Options/PokemonSwSh_CramomaticTable.h @@ -37,6 +37,7 @@ struct CramomaticSelection class CramomaticRow : public EditableTableRow{ public: CramomaticRow(EditableTableOption& parent_table); + CramomaticRow(EditableTableOption& parent_table, CramomaticBallType p_ball_type, bool p_is_bonus, uint16_t p_priority); virtual std::unique_ptr clone() const; public: diff --git a/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp b/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp index 0a2f2f0c1d..9736468248 100644 --- a/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp +++ b/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp @@ -488,7 +488,6 @@ void CramomaticRNG::program(SingleSwitchProgramEnvironment& env, BotBaseContext& }catch (OperationFailedException& e){ stats.errors++; env.update_stats(); - e.send_notification(env, NOTIFICATION_ERROR_RECOVERABLE); apricorn_selection_errors++; if (apricorn_selection_errors >= 3){ @@ -497,8 +496,7 @@ void CramomaticRNG::program(SingleSwitchProgramEnvironment& env, BotBaseContext& "Could not detect the bag three times on a row." ); } - VideoSnapshot screen = env.console.video().snapshot(); - send_program_recoverable_error_notification(env, NOTIFICATION_ERROR_RECOVERABLE, "Could not detect the bag.", screen); + send_program_recoverable_error_notification(env, NOTIFICATION_ERROR_RECOVERABLE, e.message(), e.screenshot()); is_state_valid = false; recover_from_wrong_state(env, context); continue;