diff --git a/src/data/builtin/builtin_data/locale/en.json b/src/data/builtin/builtin_data/locale/en.json index 6b39abd..9c5285c 100644 --- a/src/data/builtin/builtin_data/locale/en.json +++ b/src/data/builtin/builtin_data/locale/en.json @@ -128,7 +128,8 @@ "cutscene_skip_method": { "entry": "Cutscene Skip:", "hold": "Hold to Skip", - "fastforward": "Fast-Forward" + "fastforward": "Fast-Forward", + "auto": "Auto" }, "discord_rpc": "Discord Rich Presence:", "allow_strafe": "Allow strafe:" diff --git a/src/game/shared_game_state.rs b/src/game/shared_game_state.rs index a1f0d4d..ab17ec1 100644 --- a/src/game/shared_game_state.rs +++ b/src/game/shared_game_state.rs @@ -120,6 +120,7 @@ pub enum PlayerCount { pub enum CutsceneSkipMode { Hold, FastForward, + Auto, } impl GameDifficulty { diff --git a/src/menu/settings_menu.rs b/src/menu/settings_menu.rs index 7392c5a..8c6efad 100644 --- a/src/menu/settings_menu.rs +++ b/src/menu/settings_menu.rs @@ -572,10 +572,11 @@ impl SettingsMenu { BehaviorMenuEntry::CutsceneSkipMode, MenuEntry::Options( state.loc.t("menus.options_menu.behavior_menu.cutscene_skip_method.entry").to_owned(), - if state.settings.cutscene_skip_mode == CutsceneSkipMode::Hold { 0 } else { 1 }, + state.settings.cutscene_skip_mode as usize, vec![ state.loc.t("menus.options_menu.behavior_menu.cutscene_skip_method.hold").to_owned(), state.loc.t("menus.options_menu.behavior_menu.cutscene_skip_method.fastforward").to_owned(), + state.loc.t("menus.options_menu.behavior_menu.cutscene_skip_method.auto").to_owned(), ], ), ); @@ -986,18 +987,30 @@ impl SettingsMenu { *value = state.settings.allow_strafe; } } - MenuSelectionResult::Selected(BehaviorMenuEntry::CutsceneSkipMode, toggle) => { + MenuSelectionResult::Selected(BehaviorMenuEntry::CutsceneSkipMode, toggle) + | MenuSelectionResult::Right(BehaviorMenuEntry::CutsceneSkipMode, toggle, _) => { if let MenuEntry::Options(_, value, _) = toggle { - match state.settings.cutscene_skip_mode { - CutsceneSkipMode::Hold => { - state.settings.cutscene_skip_mode = CutsceneSkipMode::FastForward; - *value = 1; - } - CutsceneSkipMode::FastForward => { - state.settings.cutscene_skip_mode = CutsceneSkipMode::Hold; - *value = 0; - } - } + let (new_mode, new_value) = match state.settings.cutscene_skip_mode { + CutsceneSkipMode::Hold => (CutsceneSkipMode::FastForward, 1), + CutsceneSkipMode::FastForward => (CutsceneSkipMode::Auto, 2), + CutsceneSkipMode::Auto => (CutsceneSkipMode::Hold, 0), + }; + + state.settings.cutscene_skip_mode = new_mode; + *value = new_value; + let _ = state.settings.save(ctx); + } + } + MenuSelectionResult::Left(BehaviorMenuEntry::CutsceneSkipMode, toggle, _) => { + if let MenuEntry::Options(_, value, _) = toggle { + let (new_mode, new_value) = match state.settings.cutscene_skip_mode { + CutsceneSkipMode::Hold => (CutsceneSkipMode::Auto, 2), + CutsceneSkipMode::FastForward => (CutsceneSkipMode::Hold, 0), + CutsceneSkipMode::Auto => (CutsceneSkipMode::FastForward, 1), + }; + + state.settings.cutscene_skip_mode = new_mode; + *value = new_value; let _ = state.settings.save(ctx); } } diff --git a/src/scene/game_scene.rs b/src/scene/game_scene.rs index 9deb26a..c37dbd0 100644 --- a/src/scene/game_scene.rs +++ b/src/scene/game_scene.rs @@ -1841,6 +1841,9 @@ impl Scene for GameScene { state.textscript_vm.flags.set_cutscene_skip(false); } } + CutsceneSkipMode::Auto => { + state.textscript_vm.flags.set_cutscene_skip(true); + } _ => (), } } @@ -2183,7 +2186,7 @@ impl Scene for GameScene { self.falling_island.draw(state, ctx, &self.frame)?; self.text_boxes.draw(state, ctx, &self.frame)?; - if self.skip_counter > 1 || state.tutorial_counter > 0 { + if (self.skip_counter > 1 || state.tutorial_counter > 0) && (state.settings.cutscene_skip_mode != CutsceneSkipMode::Auto) { let key = { if state.settings.touch_controls { ">>".to_owned()