mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
[Enhancement] Blast Mask with Powder Keg (#642)
* Blast Mask adds Powder Keg explosive property. * Alphabetical Menu Listing + clang * Apply suggestions from code review --------- Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
@@ -536,6 +536,7 @@ void DrawEnhancementsMenu() {
|
||||
}
|
||||
|
||||
if (UIWidgets::BeginMenu("Masks")) {
|
||||
UIWidgets::CVarCheckbox("Blast Mask has Powder Keg Force", "gEnhancements.Masks.BlastMaskKeg");
|
||||
UIWidgets::CVarCheckbox("Fast Transformation", "gEnhancements.Masks.FastTransformation");
|
||||
UIWidgets::CVarCheckbox("Fierce Deity's Mask Anywhere", "gEnhancements.Masks.FierceDeitysAnywhere",
|
||||
{ .tooltip = "Allow using Fierce Deity's mask outside of boss rooms." });
|
||||
|
||||
@@ -32,6 +32,7 @@ void InitEnhancements() {
|
||||
// Masks
|
||||
RegisterFastTransformation();
|
||||
RegisterFierceDeityAnywhere();
|
||||
RegisterBlastMaskKeg();
|
||||
RegisterNoBlastMaskCooldown();
|
||||
|
||||
// Minigames
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "Cheats/UnrestrictedItems.h"
|
||||
#include "Cycle/EndOfCycle.h"
|
||||
#include "Equipment/SkipMagicArrowEquip.h"
|
||||
#include "Masks/BlastMaskKeg.h"
|
||||
#include "Masks/FierceDeityAnywhere.h"
|
||||
#include "Masks/NoBlastMaskCooldown.h"
|
||||
#include "Masks/FastTransformation.h"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#include <libultraship/bridge.h>
|
||||
#include "Enhancements/GameInteractor/GameInteractor.h"
|
||||
#include "global.h"
|
||||
|
||||
static uint32_t bombType;
|
||||
|
||||
extern "C" {
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
EquipSlot func_8082FDC4(void);
|
||||
}
|
||||
|
||||
void RegisterBlastMaskKeg() {
|
||||
GameInteractor::Instance->RegisterGameHookForID<GameInteractor::ShouldActorInit>(
|
||||
ACTOR_EN_BOM, [](Actor* actor, bool* should) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
if (CVarGetInteger("gEnhancements.Masks.BlastMaskKeg", 0)) {
|
||||
ItemId item;
|
||||
EquipSlot i = func_8082FDC4();
|
||||
|
||||
i = ((i >= EQUIP_SLOT_A) && (player->transformation == PLAYER_FORM_FIERCE_DEITY) &&
|
||||
(player->heldItemAction != PLAYER_IA_SWORD_TWO_HANDED))
|
||||
? EQUIP_SLOT_B
|
||||
: i;
|
||||
|
||||
item = Player_GetItemOnButton(gPlayState, player, i);
|
||||
if (item == ITEM_F0) {
|
||||
actor->shape.rot.x = BOMB_EXPLOSIVE_TYPE_POWDER_KEG;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef EQUIPMENT_BLAST_MASK_KEG_H
|
||||
#define EQUIPMENT_BLAST_MASK_KEG_H
|
||||
|
||||
void RegisterBlastMaskKeg();
|
||||
|
||||
#endif // EQUIPMENT_BLAST_MASK_KEG_H
|
||||
Reference in New Issue
Block a user