Skip to content

Commit 6c696bb

Browse files
authored
Autostory: add logging to change_settings_prior_to_autostory() (#665)
1 parent 2231951 commit 6c696bb

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStory.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,8 @@ void AutoStory::program(SingleSwitchProgramEnvironment& env, ProControllerContex
799799
// Connect controller
800800
pbf_press_button(context, BUTTON_L, 20, 20);
801801

802+
env.console.log("Start Segment " + ALL_AUTO_STORY_SEGMENT_LIST()[get_start_segment_index()]->name(), COLOR_ORANGE);
803+
802804
// Set settings. to ensure autosave is off.
803805
if (CHANGE_SETTINGS){
804806
change_settings_prior_to_autostory(env, context, get_start_segment_index(), LANGUAGE);

SerialPrograms/Source/PokemonSV/Programs/AutoStory/PokemonSV_AutoStoryTools.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ void change_settings_prior_to_autostory(
614614

615615
// get index of `Options` in the Main Menu, which depends on where you are in Autostory
616616
int8_t options_index;
617+
std::string assumption_text = "";
617618
switch(current_segment_num){
618619
case 0:
619620
return; // can't change settings in the intro cutscene
@@ -623,13 +624,15 @@ void change_settings_prior_to_autostory(
623624
// - Options
624625
// - Save
625626
options_index = 0;
627+
assumption_text = "We assume 'Bag' is not yet unlocked.";
626628
break;
627629
case 2:
628630
// Menu
629631
// - Bag --> unlocked after picked up bag/hat in room. Segment 01, checkpoint 02
630632
// - Options
631633
// - Save
632634
options_index = 1;
635+
assumption_text = "We assume 'Boxes' is not yet unlocked.";
633636
break;
634637
case 3:
635638
case 4:
@@ -641,6 +644,7 @@ void change_settings_prior_to_autostory(
641644
// - Options
642645
// - Save
643646
options_index = 2;
647+
assumption_text = "We assume 'Poke Portal' is not yet unlocked.";
644648
break;
645649
case 7:
646650
case 8:
@@ -652,6 +656,7 @@ void change_settings_prior_to_autostory(
652656
// - Options
653657
// - Save
654658
options_index = 3;
659+
assumption_text = "We assume 'Picnic' is not yet unlocked.";
655660
break;
656661
default:
657662
// Menu
@@ -661,10 +666,13 @@ void change_settings_prior_to_autostory(
661666
// - Poke Portal
662667
// - Options
663668
// - Save
664-
options_index = 4;
669+
options_index = 4;
670+
assumption_text = "We assume that the tutorial is done, and all menu items are unlocked.";
665671
break;
666672
}
667673

674+
env.console.log("change_settings_prior_to_autostory: " + assumption_text + " The index of \"Options\" in the Menu is " + std::to_string(options_index) + ".");
675+
668676
bool has_minimap = current_segment_num >= 2; // the minimap only shows up in segment 2 and beyond
669677

670678
enter_menu_from_overworld(env.program_info(), env.console, context, options_index, MenuSide::RIGHT, has_minimap);

0 commit comments

Comments
 (0)