Skip to content

Commit a178134

Browse files
committed
2 parents d559035 + 91b46f8 commit a178134

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

SerialPrograms/Source/NintendoSwitch/Framework/NintendoSwitch_MultiSwitchProgramSession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void MultiSwitchProgramSession::internal_run_program(){
195195
env.add_overlay_log_to_all_consoles("- Program Finished -");
196196
logger().log("Program finished normally!", COLOR_BLUE);
197197
}catch (OperationCancelledException&){
198-
env.add_overlay_log_to_all_consoles("- Operation Cancelled -", COLOR_RED);
198+
env.add_overlay_log_to_all_consoles("- Program Stopped -");
199199
}catch (ProgramCancelledException&){
200200
env.add_overlay_log_to_all_consoles("- Program Stopped -");
201201
}catch (ProgramFinishedException& e){

SerialPrograms/Source/NintendoSwitch/Framework/NintendoSwitch_SingleSwitchProgramSession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void SingleSwitchProgramSession::internal_run_program(){
151151
env.console.overlay().add_log("- Program Finished -");
152152
logger().log("Program finished normally!", COLOR_BLUE);
153153
}catch (OperationCancelledException&){
154-
env.console.overlay().add_log("- Operation Cancelled -", COLOR_RED);
154+
env.console.overlay().add_log("- Program Stopped -");
155155
}catch (ProgramCancelledException&){
156156
env.console.overlay().add_log("- Program Stopped -");
157157
}catch (ProgramFinishedException& e){

SerialPrograms/Source/PokemonLA/Programs/General/PokemonLA_OutbreakFinder.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,14 @@ std::set<std::string> OutbreakFinder::enter_region_and_read_MMO(
674674
}
675675

676676

677+
// Run one iteration of the outbreak finder loop and return true when one desired outbreak is found.
678+
// The iteration includes:
679+
// 1. Starting at Jubilife Village gate, go to check the map for outbreaks.
680+
// 2. If found desired outbreaks, stop.
681+
// 3. If need to check MMOs, save in front of gate, then go to each region with MMO and talk to Mai to
682+
// reveal MMO pokemon. Reset if no desired MMO to conserve Aguav Berries.
683+
// 4. If found desired MMO pokemon, stop.
684+
// 5. No desired outbreak in this iteration, go to an arbitrary region and return to village to refresh outbreaks.
677685
bool OutbreakFinder::run_iteration(
678686
SingleSwitchProgramEnvironment& env, ProControllerContext& context,
679687
const std::set<std::string>& desired_hisui_map_events,
@@ -712,8 +720,10 @@ bool OutbreakFinder::run_iteration(
712720
os << "Found following desired outbreak" << (desired_outbreaks_found.size() > 1 ? "s: " : ": ");
713721
for(const auto& outbreak: desired_outbreaks_found){
714722
os << outbreak << ", ";
723+
env.console.overlay().add_log("Found " + outbreak);
715724
}
716725
env.log(os.str());
726+
717727
return true;
718728
}else{
719729
env.log("No desired outbreak.");
@@ -728,7 +738,7 @@ bool OutbreakFinder::run_iteration(
728738
pbf_press_button(context, BUTTON_B, 50, 50);
729739
// Leave the guard.
730740
pbf_move_left_joystick(context, 128, 0, 100, 50);
731-
// Checking MMO costs Aguav berries.
741+
// Checking MMO costs Aguav Berries.
732742
// To not waste them, save here so that we can reset to get berries back.
733743
save_game_from_overworld(env, env.console, context);
734744

@@ -756,7 +766,7 @@ bool OutbreakFinder::run_iteration(
756766
env.update_stats();
757767
send_program_status_notification(env, NOTIFICATION_STATUS);
758768

759-
// Go to region and return.
769+
// Go to an arbitrary region and return to refresh outbreaks.
760770
goto_region_and_return(env, context, inside_travel_map);
761771

762772
return false;

0 commit comments

Comments
 (0)