diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index c6dc851c9..bf31a114d 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -325,6 +325,7 @@ void DrawEnhancementsMenu() { UIWidgets::CVarCheckbox("Fierce Deity's Mask Anywhere", "gEnhancements.Masks.FierceDeitysAnywhere", { .tooltip = "Allow using Fierce Deity's mask outside of boss rooms." }); + UIWidgets::CVarCheckbox("No Blast Mask Cooldown", "gEnhancements.Masks.NoBlastMaskCooldown", {}); ImGui::EndMenu(); } diff --git a/mm/2s2h/Enhancements/Enhancements.cpp b/mm/2s2h/Enhancements/Enhancements.cpp index fac376a60..1c0e04064 100644 --- a/mm/2s2h/Enhancements/Enhancements.cpp +++ b/mm/2s2h/Enhancements/Enhancements.cpp @@ -11,6 +11,7 @@ void InitEnhancements() { // Masks RegisterFastTransformation(); RegisterFierceDeityAnywhere(); + RegisterNoBlastMaskCooldown(); // Restorations RegisterSideRoll(); diff --git a/mm/2s2h/Enhancements/Enhancements.h b/mm/2s2h/Enhancements/Enhancements.h index 59668ae89..724836023 100644 --- a/mm/2s2h/Enhancements/Enhancements.h +++ b/mm/2s2h/Enhancements/Enhancements.h @@ -5,6 +5,7 @@ #include "Cheats/Infinite.h" #include "Cycle/EndOfCycle.h" #include "Masks/FierceDeityAnywhere.h" +#include "Masks/NoBlastMaskCooldown.h" #include "Masks/FastTransformation.h" #include "Cutscenes/SkipEntranceCutscenes.h" #include "Cutscenes/HideTitleCards.h" diff --git a/mm/2s2h/Enhancements/GameInteractor/GameInteractor.h b/mm/2s2h/Enhancements/GameInteractor/GameInteractor.h index e3cadbec9..3535b8802 100644 --- a/mm/2s2h/Enhancements/GameInteractor/GameInteractor.h +++ b/mm/2s2h/Enhancements/GameInteractor/GameInteractor.h @@ -32,6 +32,7 @@ typedef enum { GI_VB_SHOW_TITLE_CARD, GI_VB_PLAY_ENTRANCE_CS, GI_VB_DISABLE_FD_MASK, + GI_VB_SET_BLAST_MASK_COOLDOWN_TIMER, GI_VB_PATCH_SIDEROLL, GI_VB_PREVENT_MASK_TRANSFORMATION_CS, } GIVanillaBehavior; diff --git a/mm/2s2h/Enhancements/Masks/NoBlastMaskCooldown.cpp b/mm/2s2h/Enhancements/Masks/NoBlastMaskCooldown.cpp new file mode 100644 index 000000000..4fb62749a --- /dev/null +++ b/mm/2s2h/Enhancements/Masks/NoBlastMaskCooldown.cpp @@ -0,0 +1,10 @@ +#include +#include "Enhancements/GameInteractor/GameInteractor.h" + +void RegisterNoBlastMaskCooldown() { + REGISTER_VB_SHOULD(GI_VB_SET_BLAST_MASK_COOLDOWN_TIMER, { + if (CVarGetInteger("gEnhancements.Masks.NoBlastMaskCooldown", 0)) { + *should = false; + } + }); +} diff --git a/mm/2s2h/Enhancements/Masks/NoBlastMaskCooldown.h b/mm/2s2h/Enhancements/Masks/NoBlastMaskCooldown.h new file mode 100644 index 000000000..ed2a85efc --- /dev/null +++ b/mm/2s2h/Enhancements/Masks/NoBlastMaskCooldown.h @@ -0,0 +1,6 @@ +#ifndef NO_BLAST_MASK_COOLDOWN_H +#define NO_BLAST_MASK_COOLDOWN_H + +void RegisterNoBlastMaskCooldown(); + +#endif // NO_BLAST_MASK_COOLDOWN_H diff --git a/mm/src/overlays/actors/ovl_player_actor/z_player.c b/mm/src/overlays/actors/ovl_player_actor/z_player.c index 862bde7a8..b402dc7ce 100644 --- a/mm/src/overlays/actors/ovl_player_actor/z_player.c +++ b/mm/src/overlays/actors/ovl_player_actor/z_player.c @@ -3726,7 +3726,9 @@ void Player_ProcessItemButtons(Player* this, PlayState* play) { if (bomb != NULL) { bomb->timer = 0; - this->blastMaskTimer = 310; + if (GameInteractor_Should(GI_VB_SET_BLAST_MASK_COOLDOWN_TIMER, true, NULL)) { + this->blastMaskTimer = 310; + } } } } else if (item == ITEM_F1) {