From 58a18de2b91f5e12d48a620b59906ed77aae234d Mon Sep 17 00:00:00 2001 From: jugeeya Date: Mon, 13 Mar 2023 22:12:24 -0700 Subject: [PATCH] Save State Slots: Add enabler toggle, switch to Shield+Left/Right (#505) * Switch to Shield+Left/Right * Add option in menu --- src/common/button_config.rs | 8 ++++---- training_mod_consts/src/lib.rs | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/common/button_config.rs b/src/common/button_config.rs index 9d8e5a5..e88d4aa 100644 --- a/src/common/button_config.rs +++ b/src/common/button_config.rs @@ -119,11 +119,11 @@ fn save_all_btn_config_from_defaults() { press: vec!["UPTAUNT".to_string()], }, previous_save_state_slot: BtnList { - hold: vec!["GRAB".to_string()], + hold: vec!["SHIELD".to_string()], press: vec!["LEFTTAUNT".to_string()], }, next_save_state_slot: BtnList { - hold: vec!["GRAB".to_string()], + hold: vec!["SHIELD".to_string()], press: vec!["RIGHTTAUNT".to_string()], }, }, @@ -270,10 +270,10 @@ hold=["GRAB",] press=["UPTAUNT",] [button_config.previous_save_state_slot] -hold=["GRAB",] +hold=["SHIELD",] press=["LEFTTAUNT",] [button_config.next_save_state_slot] -hold=["GRAB",] +hold=["SHIELD",] press=["RIGHTTAUNT",] "#; diff --git a/training_mod_consts/src/lib.rs b/training_mod_consts/src/lib.rs index 72f6478..ce27666 100644 --- a/training_mod_consts/src/lib.rs +++ b/training_mod_consts/src/lib.rs @@ -48,6 +48,7 @@ pub struct TrainingModpackMenu { pub save_damage_limits_player: DamagePercent, pub save_state_autoload: OnOff, pub save_state_enable: OnOff, + pub save_state_slot_enable: OnOff, pub save_state_mirroring: SaveStateMirroring, pub sdi_state: Direction, pub sdi_strength: SdiFrequency, @@ -123,6 +124,7 @@ pub static DEFAULTS_MENU: TrainingModpackMenu = TrainingModpackMenu { save_damage_limits_player: DamagePercent::default(), save_state_autoload: OnOff::Off, save_state_enable: OnOff::On, + save_state_slot_enable: OnOff::On, save_state_mirroring: SaveStateMirroring::None, sdi_state: Direction::empty(), sdi_strength: SdiFrequency::None, @@ -527,6 +529,19 @@ pub unsafe fn ui_menu(menu: TrainingModpackMenu) -> UiMenu<'static> { true, &(menu.save_state_enable as u32), ); + save_state_tab.add_submenu_with_toggles::( + + "Enable Slots", + + "save_state_slot_enable", + + "Save State Slots: Enable save state slots. Switch to a different slot with Shield+Left or Right Taunt.", + + true, + + &(menu.save_state_enable as u32), + + ); save_state_tab.add_submenu_with_toggles::( "Character Item", "character_item",