[Enhancement] Unequip C-items (#6043)

This commit is contained in:
OtherBlue
2025-12-30 21:36:33 -03:00
committed by GitHub
parent 7d6a82be4f
commit c688923272
5 changed files with 108 additions and 6 deletions
@@ -3,6 +3,7 @@
#include "textures/parameter_static/parameter_static.h"
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
static u8 sChildUpgrades[] = { UPG_BULLET_BAG, UPG_BOMB_BAG, UPG_STRENGTH, UPG_SCALE };
static u8 sAdultUpgrades[] = { UPG_QUIVER, UPG_BOMB_BAG, UPG_STRENGTH, UPG_SCALE };
@@ -677,9 +678,11 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
default:
break;
}
KaleidoScope_SetupItemEquip(play, cursorItem, slot,
pauseCtx->equipVtx[cursorSlot * 4].v.ob[0] * 10,
pauseCtx->equipVtx[cursorSlot * 4].v.ob[1] * 10);
if (GameInteractor_Should(VB_EQUIP_ITEM_TO_C_BUTTON, true, play, slot, cursorItem)) {
KaleidoScope_SetupItemEquip(play, cursorItem, slot,
pauseCtx->equipVtx[cursorSlot * 4].v.ob[0] * 10,
pauseCtx->equipVtx[cursorSlot * 4].v.ob[1] * 10);
}
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -692,9 +692,11 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
if (CHECK_BTN_ANY(input->press.button, buttonsToCheck)) {
if (CHECK_AGE_REQ_SLOT(cursorSlot) && (cursorItem != ITEM_SOLD_OUT) &&
(cursorItem != ITEM_NONE)) {
KaleidoScope_SetupItemEquip(play, cursorItem, cursorSlot,
pauseCtx->itemVtx[index].v.ob[0] * 10,
pauseCtx->itemVtx[index].v.ob[1] * 10);
if (GameInteractor_Should(VB_EQUIP_ITEM_TO_C_BUTTON, true, play, cursorSlot, cursorItem)) {
KaleidoScope_SetupItemEquip(play, cursorItem, cursorSlot,
pauseCtx->itemVtx[index].v.ob[0] * 10,
pauseCtx->itemVtx[index].v.ob[1] * 10);
}
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);