Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,8 @@ void AutoStory::program(SingleSwitchProgramEnvironment& env, ProControllerContex
// Connect controller
pbf_press_button(context, BUTTON_L, 20, 20);

env.console.log("Start Segment " + ALL_AUTO_STORY_SEGMENT_LIST()[get_start_segment_index()]->name(), COLOR_ORANGE);

// Set settings. to ensure autosave is off.
if (CHANGE_SETTINGS){
change_settings_prior_to_autostory(env, context, get_start_segment_index(), LANGUAGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ void change_settings_prior_to_autostory(

// get index of `Options` in the Main Menu, which depends on where you are in Autostory
int8_t options_index;
std::string assumption_text = "";
switch(current_segment_num){
case 0:
return; // can't change settings in the intro cutscene
Expand All @@ -623,13 +624,15 @@ void change_settings_prior_to_autostory(
// - Options
// - Save
options_index = 0;
assumption_text = "We assume 'Bag' is not yet unlocked.";
break;
case 2:
// Menu
// - Bag --> unlocked after picked up bag/hat in room. Segment 01, checkpoint 02
// - Options
// - Save
options_index = 1;
assumption_text = "We assume 'Boxes' is not yet unlocked.";
break;
case 3:
case 4:
Expand All @@ -641,6 +644,7 @@ void change_settings_prior_to_autostory(
// - Options
// - Save
options_index = 2;
assumption_text = "We assume 'Poke Portal' is not yet unlocked.";
break;
case 7:
case 8:
Expand All @@ -652,6 +656,7 @@ void change_settings_prior_to_autostory(
// - Options
// - Save
options_index = 3;
assumption_text = "We assume 'Picnic' is not yet unlocked.";
break;
default:
// Menu
Expand All @@ -661,10 +666,13 @@ void change_settings_prior_to_autostory(
// - Poke Portal
// - Options
// - Save
options_index = 4;
options_index = 4;
assumption_text = "We assume that the tutorial is done, and all menu items are unlocked.";
break;
}

env.console.log("change_settings_prior_to_autostory: " + assumption_text + " The index of \"Options\" in the Menu is " + std::to_string(options_index) + ".");

bool has_minimap = current_segment_num >= 2; // the minimap only shows up in segment 2 and beyond

enter_menu_from_overworld(env.program_info(), env.console, context, options_index, MenuSide::RIGHT, has_minimap);
Expand Down
Loading